Added a static assert to make sure that flat_[xxx]map::allocator_type::value_type is std::pair<Key, T>. Fixed some test cases failing to do that properly.

This commit is contained in:
Ion Gaztañaga
2013-12-24 19:00:52 +01:00
parent 95e6ba9839
commit 9ac4ae6fdc
6 changed files with 136 additions and 64 deletions

View File

@@ -114,9 +114,9 @@ typedef multiset<alloc_int, std::less<alloc_int>, AllocIntAllocator> MultiSet;
//[multi]flat_map/set
typedef std::pair<alloc_int, alloc_int> FlatMapNode;
typedef scoped_allocator_adaptor<SimpleAllocator<FlatMapNode> > FlatMapAllocator;
typedef flat_map<alloc_int, alloc_int, std::less<alloc_int>, MapAllocator> FlatMap;
typedef flat_map<alloc_int, alloc_int, std::less<alloc_int>, FlatMapAllocator> FlatMap;
typedef flat_set<alloc_int, std::less<alloc_int>, AllocIntAllocator> FlatSet;
typedef flat_multimap<alloc_int, alloc_int, std::less<alloc_int>, MapAllocator> FlatMultiMap;
typedef flat_multimap<alloc_int, alloc_int, std::less<alloc_int>, FlatMapAllocator> FlatMultiMap;
typedef flat_multiset<alloc_int, std::less<alloc_int>, AllocIntAllocator> FlatMultiSet;
//vector, deque, list, slist, stable_vector.