From 4757800cfd1c2e58fb50d624baa4063b18e59eb3 Mon Sep 17 00:00:00 2001 From: Alessandro Vergani Date: Fri, 18 Sep 2015 16:18:07 +0200 Subject: [PATCH] Fix P.5 first example The shift instruction in the example should be <<= instead of >>= --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index ad167b6..e19c3a6 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -542,7 +542,7 @@ For example: static_assert(sizeof(Int)>=4); // do: compile-time check int bits = 0; // don't: avoidable code - for (Int i = 1; i; i>>=1) + for (Int i = 1; i; i<<=1) ++bits; if (bits<32) cerr << "Int too small\n";