From e58bce6f6a1c7c9f931a2ada7799fee87e472979 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Thu, 10 Jan 2019 20:00:55 +0100 Subject: [PATCH] Fix typo in ES.102 (#1312) The value -2 is signed, so the word "unsigned" is clearly wrong. The text notes that negative subscripts are a source of surprises and bugs, so the correction to "negative" seems to reflect Bjarne's original intent. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index c664ab9..7af9411 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -13059,7 +13059,7 @@ This makes surprises (and bugs) inevitable. * Flag mixed signed and unsigned arithmetic * Flag results of unsigned arithmetic assigned to or printed as signed. -* Flag unsigned literals (e.g. `-2`) used as container subscripts. +* Flag negative literals (e.g. `-2`) used as container subscripts. * (To avoid noise) Do not flag on a mixed signed/unsigned comparison where one of the arguments is `sizeof` or a call to container `.size()` and the other is `ptrdiff_t`.