mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
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.
This commit is contained in:
parent
526f14f56a
commit
e58bce6f6a
|
@ -13059,7 +13059,7 @@ This makes surprises (and bugs) inevitable.
|
||||||
|
|
||||||
* Flag mixed signed and unsigned arithmetic
|
* Flag mixed signed and unsigned arithmetic
|
||||||
* Flag results of unsigned arithmetic assigned to or printed as signed.
|
* 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`.
|
* (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`.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user