You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [dcl.fct.def.default]/1.1, we find that an explicitly-defaulted function shall
be a special member function or a comparison operator (7.6.8, 7.6.9, 7.6.10)
but what is a "comparison operator"? The cross-references point to some [expr] subsections that have pretty much nothing to do with it. (Those are the places where we don't go when there is a comparison operator to use!)
Similarly [class.compare.default] talks about "A defaulted comparison operator function" with the same list of irrelevant cross-references, and likewise in [except.spec]p11.
We should add a definition of "comparison operator" as one of the seven intended overloaded operator functions (operator<, operator<=, operator>, operator<=, operator==, operator!=, operator<=>), probably in [over.binary], and change all the above cross-references to point at that instead. I think the existing list of cross-references is sufficiently suggestive that this can be done editorially.
While we're here, we should consider renaming the term from "comparison operator" to "comparison function", matching "conversion function" and clarifying that we mean the function case and not the built-in operator case.
The text was updated successfully, but these errors were encountered:
In [dcl.fct.def.default]/1.1, we find that an explicitly-defaulted function shall
but what is a "comparison operator"? The cross-references point to some [expr] subsections that have pretty much nothing to do with it. (Those are the places where we don't go when there is a comparison operator to use!)
Similarly [class.compare.default] talks about "A defaulted comparison operator function" with the same list of irrelevant cross-references, and likewise in [except.spec]p11.
We should add a definition of "comparison operator" as one of the seven intended overloaded operator functions (
operator<
,operator<=
,operator>
,operator<=
,operator==
,operator!=
,operator<=>
), probably in [over.binary], and change all the above cross-references to point at that instead. I think the existing list of cross-references is sufficiently suggestive that this can be done editorially.While we're here, we should consider renaming the term from "comparison operator" to "comparison function", matching "conversion function" and clarifying that we mean the function case and not the built-in operator case.
The text was updated successfully, but these errors were encountered: