Skip to content

Commit ac12980

Browse files
Replace erroneous use of overflow
Modulo behaviour of unsigned integers appears to be referred to as overflow. However, [unsigned integers don't overflow](https://eel.is/c++draft/basic.fundamental#note-1). Replaced "overflow behavior" with "modulo behavior".
1 parent 33bcd01 commit ac12980

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎CppCoreGuidelines.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13578,7 +13578,7 @@ but if you had seen `us - (s + 2)` or `s += 2; ...; us - s`, would you reliably
1357813578
##### Exception
1357913579

1358013580
Use unsigned types if you really want modular arithmetic - add
13581-
comments as necessary noting the reliance on overflow behavior, as such code
13581+
comments as necessary noting the reliance on modulo behavior, as such code
1358213582
is going to be surprising for many programmers.
1358313583

1358413584
##### Example

0 commit comments

Comments
 (0)