Skip to content

Commit

Permalink
Mention no uninit memory in collections
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Sep 26, 2023
1 parent 76f08a7 commit af55370
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sus/collections/collections.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace sus {
/// fail to compile. And in some cases, will perform runtime checks and
/// terminate in the case of a software bug, which is represented in the
/// method documentation.
/// * No uninitialized memory through default initialization.
/// * 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 All @@ -44,10 +45,10 @@ namespace sus {
/// and easily write error handling instead of Undefined Behaviour or
/// crashes.
/// * No accidental copies. Subspace collections (that are not view types) do
/// not satisfy the [`Copy`]($sus::mem::Copy) concept, and instead must be explicitly
/// cloned via `sus::clone(x)` to make a copy. This allows them to be passed
/// by value without introducing a copy at a caller that was expecting it to
/// be received by reference.
/// not satisfy the [`Copy`]($sus::mem::Copy) concept, and instead must be
/// explicitly cloned via `sus::clone(x)` to make a copy.
/// This allows them to be passed by value without introducing a copy at a
/// caller that was expecting it to be received by reference.
/// * Catch iterator invalidation. By default Subspace containers are built with
/// runtime protection against iterator invalidation. Iterators produced by
/// collections are tracked and if the collection is mutated while an iterator
Expand Down

0 comments on commit af55370

Please sign in to comment.