Fixed misapplied edit for <=>

This commit is contained in:
Herb Sutter
2021-04-01 11:41:27 -07:00
parent 4f6e11940e
commit c8e72981c4

View File

@@ -6513,11 +6513,11 @@ The alternative is to make two failure states compare equal and any valid state
##### Note ##### Note
This rule applies to all the usual comparison operators: `!=`, `<`, `<=`, `>`, `>=`, and `<=>`. This rule applies to all the usual comparison operators: `!=`, `<`, `<=`, `>`, and `>=`.
##### Enforcement ##### Enforcement
* Flag an `operator==()` for which the argument types differ; same for other comparison operators: `!=`, `<`, `<=`, `>`, `>=`, and `<=>`. * Flag an `operator==()` for which the argument types differ; same for other comparison operators: `!=`, `<`, `<=`, `>`, and `>=`.
* Flag member `operator==()`s; same for other comparison operators: `!=`, `<`, `<=`, `>`, and `>=`. * Flag member `operator==()`s; same for other comparison operators: `!=`, `<`, `<=`, `>`, and `>=`.
### <a name="Rc-eq-base"></a>C.87: Beware of `==` on base classes ### <a name="Rc-eq-base"></a>C.87: Beware of `==` on base classes
@@ -6562,11 +6562,11 @@ Of course there are ways of making `==` work in a hierarchy, but the naive appro
##### Note ##### Note
This rule applies to all the usual comparison operators: `!=`, `<`, `<=`, `>`, and `>=`. This rule applies to all the usual comparison operators: `!=`, `<`, `<=`, `>`, `>=`, and `<=>`.
##### Enforcement ##### Enforcement
* Flag a virtual `operator==()`; same for other comparison operators: `!=`, `<`, `<=`, `>`, and `>=`. * Flag a virtual `operator==()`; same for other comparison operators: `!=`, `<`, `<=`, `>`, `>=`, and `<=>`.
### <a name="Rc-hash"></a>C.89: Make a `hash` `noexcept` ### <a name="Rc-hash"></a>C.89: Make a `hash` `noexcept`