mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 09:45:28 +03:00
flat_set/map: workaround for gcc-4.8 C++11 defect
The STL shipped with gcc-4.8 does not provide vector::erase(const_iterator) for C++11, instead only taking a mutable iterator. This causes problems with flat_set/map if we don't have Boost small_vector available and we fall back to std::vector. We work around this by providing a function to construct a mutable iterator given a const_iterator for internal use.
This commit is contained in:
committed by
Matthew Barr
parent
87469d4775
commit
09f5699df7
@@ -55,6 +55,9 @@ using small_vector = boost::container::small_vector<T, N, Allocator>;
|
||||
template <class T, std::size_t N, typename Allocator = std::allocator<T>>
|
||||
using small_vector = std::vector<T, Allocator>;
|
||||
|
||||
// Support workarounds for flat_set/flat_map and GCC 4.8.
|
||||
#define SMALL_VECTOR_IS_STL_VECTOR 1
|
||||
|
||||
#endif // HAVE_BOOST_CONTAINER_SMALL_VECTOR
|
||||
|
||||
} // namespace ue2
|
||||
|
||||
Reference in New Issue
Block a user