From 2a9d0a43b8cbc0c49bfaa3a454c95f0f0d32f299 Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Wed, 10 Aug 2016 22:59:00 +0200 Subject: [PATCH] dodgy example code --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 1c92c21..654f5d9 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -7099,7 +7099,7 @@ Avoiding inconsistent definition in different namespaces bool operator==(S, S); // OK: in the same namespace as S, and even next to S S s; - bool s == s; + bool x = (s == s); This is what a default `==` would do, if we had such defaults. @@ -7112,7 +7112,7 @@ This is what a default `==` would do, if we had such defaults. N::S s; - bool s == s; // finds N::operator==() by ADL + bool x = (s == s); // finds N::operator==() by ADL ##### Example, bad