-
Notifications
You must be signed in to change notification settings - Fork 781
Description
The subject paragraph:
The return value
V
of typeR
of the defaulted three-way comparison operator function with parametersx
andy
of the same type is determined by comparing corresponding elementsx_i
andy_i
in the expanded lists of subobjects forx
andy
until the first indexi
wherex_i <=> y_i
yields a result valuev_i
wherev_i != 0
, contextually converted tobool
, yieldstrue
;V
isv_i
converted toR
. If no such index exists,V
isstd::strong_ordering::equal
converted toR
.
is clear that corresponding elements are compared, and that the process of comparison must terminate, but specifies neither the order in which indices within the list of subobjects are chosen nor that said sequence of chosen indices contains no duplicates. It's almost certainly the intent that corresponding pairs of elements are compared in order of increasing subscript, but that doesn't seem to be mandated.
#2729 adds similar wording elsewhere with the same issue. Could we clarify these editorially, or does this need a core issue?