Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CppCoreGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -13578,7 +13578,7 @@ but if you had seen `us - (s + 2)` or `s += 2; ...; us - s`, would you reliably
##### Exception

Use unsigned types if you really want modular arithmetic - add
comments as necessary noting the reliance on overflow behavior, as such code
comments as necessary noting the reliance on modulo behavior, as such code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is of course correct, but I wonder if it would be more friendly to casual readers like so:

Suggested change
comments as necessary noting the reliance on modulo behavior, as such code
comments as necessary noting the reliance on modulo behavior, i.e. wrapping to zero, as such code

is going to be surprising for many programmers.

##### Example
Expand Down
Loading