A three-way comparison operator for a class type C
is a structural comparison operator
if it is defined as defaulted in the definition of C,
and all three-way comparison operators it invokes
are structural comparison operators.
A type T
has strong structural equality
if, for a glvalue x of type const T,
x <=> x is a valid expression
of type std::strong_ordering or std::strong_equality
and either does not invoke a three-way comparison operator
or invokes a structural comparison operator.
The direct base class subobjects of C,
in the order of their declaration in the base-specifier-list of C,
followed by the non-static data members of C,
in the order of their declaration in the member-specification of C,
form a list of subobjects.
In that list, any subobject of array type is recursively expanded
to the sequence of its elements, in the order of increasing subscript.
Let xi be an lvalue denoting the ith element
in the expanded list of subobjects for an object x
(of length n),
where xi is
formed by a sequence of
derived-to-base conversions ([over.best.ics]),
class member access expressions ([expr.ref]), and
array subscript expressions ([expr.sub]) applied to x.
The type of the expression xi<=>xi
is denoted by Ri.
It is unspecified
whether virtual base class subobjects are compared more than once.
The return value V of type R
of the defaulted three-way comparison operator function
with parameters x and y of the same type
is determined by comparing corresponding elements
xi and yi
in the expanded lists of subobjects for x and y
until the first index i
yields a result value vi where vi!=0,
contextually converted to bool, yields true;
V is vi converted to R.
If no such index exists, V is
std::strong_ordering::equal converted to R.
at least one Ti is std::weak_equality, or
at least one Ti is std::strong_equality and
at least one Tj is std::partial_ordering or
U is std::weak_equality ([cmp.weakeq]).
overload resolution ([over.match]),
as applied to x <=> y
(also considering synthesized candidates with reversed order of parameters ([over.match.oper])),
results in an ambiguity
or a function that is deleted or inaccessible from the operator function,