C.168 Fix code example (#1954)

pull/1956/head
Baiyan Huang 3 years ago committed by GitHub
parent dca24a0379
commit 444704f703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8525,13 +8525,13 @@ This is what a default `==` would do, if we had such defaults.
S s;
namespace N {
S::operator!(S a) { return true; }
S not_s = !s;
bool operator!(S a) { return true; }
bool not_s = !s;
}
namespace M {
S::operator!(S a) { return false; }
S not_s = !s;
bool operator!(S a) { return false; }
bool not_s = !s;
}
Here, the meaning of `!s` differs in `N` and `M`.

Loading…
Cancel
Save