Skip to content

Commit

Permalink
remake vector_set from inheritance from underlying container to aggre…
Browse files Browse the repository at this point in the history
…gation

this makes it safer, as it disallows some of changes that could violate sorted contract
it also saves at least sizeof(void*) on most common comparators (due to empty struct optimization in compressed_pair)

con: it explicitly requires container class to follow vector API (almost all functions are exposed in vector_set)

to consider: remove non const front(), back(), at(), [] access.
Those are not safe either, left them only for compatibility
  • Loading branch information
AntonYudintsev committed Oct 25, 2022
1 parent 6a94249 commit 2fe435b
Showing 1 changed file with 112 additions and 81 deletions.
Loading

0 comments on commit 2fe435b

Please sign in to comment.