boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
100 stars 116 forks source link

Use real_allocator to find allocator when rebinding #115

Closed ecatmur closed 5 years ago

ecatmur commented 5 years ago

After 83bb62fed3aca489e447e394f3b23c272712ecb7 the allocator parameter of e.g. small_vector can be void. Use real_allocator to convert this to the actual allocator used by the container.

example (works up to 1.69, breaks in 1.70):

#include <boost/container/flat_map.hpp>
#include <boost/container/small_vector.hpp>
boost::container::flat_map<int, int, std::less<>,
    boost::container::small_vector<std::pair<int, int>, 7>> m;
igaztanaga commented 5 years ago

Thanks for the report. I've cherry-picked the first commit:

https://github.com/boostorg/container/commit/b075bce22ebbdbbe2a846820ae8ba2d410099a14

Thanks to your test case, I've found another problem: Issue #118. I will add new test cases to test flat_map and flat_set as adaptors.