From 444704f703a40aa1295605f0ef70d94615376034 Mon Sep 17 00:00:00 2001 From: Baiyan Huang Date: Fri, 5 Aug 2022 20:53:47 +0800 Subject: [PATCH] C.168 Fix code example (#1954) --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 3672e29..4fec73c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -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`.