Modify flat associative containers to be adaptors if the allocator argument is a container. This allows using stable_vector, small_vector, static_vector as underlying containers.

This commit is contained in:
Ion Gaztañaga committed 2017-08-27 12:40:15 +02:00
1 parent 6530b7870f
commit 2297f6af72
16 files changed
+1008 -474

No files matched your search

+12 -6
View File
@@ -426,11 +426,10 @@ functions), implemented on top of std::vector. AssocVector differs from a map in
its erase functions (AssocVector::erase invalidates all iterators into the object) and in the
complexity guarantees of insert and erase (linear as opposed to constant). ]]
[*Boost.Container] `flat_[multi]map/set` containers are ordered-vector based associative containers
based on Austern's and Alexandrescu's guidelines. These ordered vector containers have also
benefited recently with the addition of `move semantics` to C++, speeding up insertion
and erasure times considerably. Flat associative containers have the following
attributes:
[*Boost.Container] `flat_[multi]map/set` containers are ordered, vector-like container based, associative
containers following Austern's and Alexandrescu's guidelines. These ordered vector containers have also
benefited with the addition of `move semantics` to C++11, speeding up insertion and
erasure times considerably. Flat associative containers have the following attributes:
* Faster lookup than standard associative containers
* Much faster iteration than standard associative containers.
@@ -1213,6 +1212,14 @@ use [*Boost.Container]? There are several reasons for that:
[section:release_notes Release Notes]
[section:release_notes_boost_1_66_00 Boost 1.66 Release]
* ['flat_[multi]map/set] can now work as container adaptors, as proposed in [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0429r1.pdf P0429R1].
The allocator argument is checked for ['size()] and ['empty()] members. If so, the argument is interpreted as the required underlying container.
This means that ['static_vector], ['stable_vector] and ['small_vector] can be used now with flat associative containers.
[endsect]
[section:release_notes_boost_1_65_00 Boost 1.65 Release]
* Implemented `extract_sequence`, `adopt_sequence` functions for flat_[multi]map/set associative containers.
@@ -1246,7 +1253,6 @@ use [*Boost.Container]? There are several reasons for that:
[endsect]
https://svn.boost.org/trac/boost/ticket/12577#comment:1
[section:release_notes_boost_1_62_00 Boost 1.62 Release]
* Fixed bugs: