From 71df1537b30365778065ad1257fec5c4393b6a6d Mon Sep 17 00:00:00 2001 From: Malcolm Parsons Date: Sun, 2 Oct 2016 19:58:34 +0100 Subject: [PATCH] P.5 Correct case of Int alias Revert d9562f683d4cbefd5c8b5ab356ab3de6bcc35baf and part of 9590bb94b10ee78439589b658c6fdfa6234bd6ed --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index a3dd5ce..948c42e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -579,7 +579,7 @@ You don't need to write error handlers for errors caught at compile time. // Int is an alias used for integers 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" @@ -587,7 +587,7 @@ You don't need to write error handlers for errors caught at compile time. This example is easily simplified // Int is an alias used for integers - static_assert(sizeof(int) >= 4); // do: compile-time check + static_assert(sizeof(Int) >= 4); // do: compile-time check ##### Example