Skip to content

Commit 2a9d0a4

Browse files
committed
dodgy example code
1 parent 0785e0b commit 2a9d0a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7099,7 +7099,7 @@ Avoiding inconsistent definition in different namespaces
70997099
bool operator==(S, S); // OK: in the same namespace as S, and even next to S
71007100
S s;
71017101

7102-
bool s == s;
7102+
bool x = (s == s);
71037103

71047104
This is what a default `==` would do, if we had such defaults.
71057105

@@ -7112,7 +7112,7 @@ This is what a default `==` would do, if we had such defaults.
71127112

71137113
N::S s;
71147114

7115-
bool s == s; // finds N::operator==() by ADL
7115+
bool x = (s == s); // finds N::operator==() by ADL
71167116

71177117
##### Example, bad
71187118

0 commit comments

Comments
 (0)