From a591b3c27997f14aecc68f2f512514683fe57c17 Mon Sep 17 00:00:00 2001 From: Rafael Sadowski Date: Fri, 19 May 2017 18:01:41 +0200 Subject: [PATCH] fix: unsigned int value comment --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index f666e40..84a1298 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -11895,7 +11895,7 @@ Using `unsigned` doesn't actually eliminate the possibility of negative values. unsigned int u1 = -2; // OK: the value of u1 is 4294967294 int i1 = -2; - unsigned int u2 = i1; // OK: the value of u2 is -2 + unsigned int u2 = i1; // OK: the value of u2 is 4294967294 int i2 = u2; // OK: the value of i2 is -2 These problems with such (perfectly legal) constructs are hard to spot in real code and are the source of many real-world errors.