Skip to content

Commit

Permalink
Mention indexing operations with std containers and signed ints
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Sep 26, 2023
1 parent af55370 commit e6e9821
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sus/collections/collections.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ namespace sus {
/// terminate in the case of a software bug, which is represented in the
/// method documentation.
/// * No uninitialized memory through default initialization.
/// * Indexing operations with negative signed values no longer compile.
/// Containers that index on `size_t` (as in the standard library), instead of
/// `usize`, will silently accept memory safety bugs with negative indices.
/// * Providing explicit unsafe backdoors. Occasionally runtime checks can't be
/// elided by the compiler and they are in hot code that has visible
/// performance impact. Explicit unsafe backdoors allow individual callsites
Expand Down

0 comments on commit e6e9821

Please sign in to comment.