From b22df66453d922e580ecb250ca169e3a87dc9472 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 29 Sep 2022 14:28:23 -0700 Subject: [PATCH] Closes #1907 --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index d9a7cf3..a4fde07 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -13636,7 +13636,7 @@ To avoid the pitfalls with `auto` and `int`. ##### Note -The built-in array uses signed subscripts. +The built-in array allows signed subscripts. The standard-library containers use unsigned subscripts. Thus, no perfect and fully compatible solution is possible (unless and until the standard-library containers change to use signed subscripts someday in the future). Given the known problems with unsigned and signed/unsigned mixtures, better stick to (signed) integers of a sufficient size, which is guaranteed by `gsl::index`.