|
|
|
|
@ -6594,18 +6594,18 @@ By itself, `cout_my_class` would be OK, but it is not usable/composabe with code
|
|
|
|
|
// ...
|
|
|
|
|
cout << "var = " << var << '\n';
|
|
|
|
|
|
|
|
|
|
###### Note
|
|
|
|
|
##### Note
|
|
|
|
|
|
|
|
|
|
There are strong and vigorous conventions for the meaning most operators, such as
|
|
|
|
|
|
|
|
|
|
* comparisons (`==`, `!=`, '<', `<=`, `>`, and `>=`)
|
|
|
|
|
* comparisons (`==`, `!=`, `<`, `<=`, `>`, and `>=`),
|
|
|
|
|
* arithmetic operations (`+`, `-`, `*`, `/`, and `%`)
|
|
|
|
|
* access operations (`.`, `->`, unary `*`, and `[]`)
|
|
|
|
|
* assignment (`=`)
|
|
|
|
|
|
|
|
|
|
Don't define those unconventionally and don't invent your own names for them.
|
|
|
|
|
|
|
|
|
|
###### Enforcement
|
|
|
|
|
##### Enforcement
|
|
|
|
|
|
|
|
|
|
Tricky. Requires semantic insight.
|
|
|
|
|
|
|
|
|
|
|