3295. Comparison category operator== are mis-specified

Section: 17.11.2 [cmp.categories] Status: Resolved Submitter: Barry Revzin Opened: 2019-09-14 Last modified: 2019-12-29

Priority: 1

View all other issues in [cmp.categories].

View all issues with Resolved status.

Discussion:

All the defaulted operator==s in 17.11.2 [cmp.categories] are currently specified as:

friend constexpr bool operator==(strong_ordering v, strong_ordering w) noexcept = default;

But the rule for defaulting operator== requires that the arguments be const&. All five should all look like:

friend constexpr bool operator==(const strong_ordering& v, const strong_ordering& w) noexcept = default; 

[2019-10-31 Issue Prioritization]

Priority to 1 after reflector discussion.

[2019-11 Wednesday night issue processing - status to Open]

Our preference is for CWG to fix this. JW to provide wording in case CWG cannot.

[Resolved by the adoption of P1946R0 in Belfast]

Proposed resolution: