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 13, 2022
1 parent 4f8bbfe commit 53d4902
Showing 1 changed file with 112 additions and 81 deletions.
Loading

0 comments on commit 53d4902

Please sign in to comment.