forked from boostorg/unordered
Support containers with const value type
Currently just storing the value without a const. Can do better with C++11 constructors, so maybe should do that, and cast away const on compilers without support. Another problem is that std::allocator<const int> doesn't compile for libstdc++ (and potentially other standard libraries), so boost::unordered_set<const int> can't compile. I'm not sure if I should work around that, as it means changing the type of the container (i.e. to boost::unordered_set<const int,... , std::allocator<int>>).
This commit is contained in:
@@ -24,15 +24,15 @@ template class boost::unordered_map<
|
||||
std::equal_to<int>,
|
||||
test::minimal::allocator<std::pair<int const, int> > >;
|
||||
template class boost::unordered_multimap<
|
||||
int,
|
||||
int,
|
||||
int const,
|
||||
int const,
|
||||
boost::hash<int>,
|
||||
std::equal_to<int>,
|
||||
test::minimal::allocator<std::pair<int const, int> > >;
|
||||
|
||||
template class boost::unordered_map<
|
||||
test::minimal::assignable,
|
||||
test::minimal::default_assignable,
|
||||
test::minimal::assignable const,
|
||||
test::minimal::default_assignable const,
|
||||
test::minimal::hash<test::minimal::assignable>,
|
||||
test::minimal::equal_to<test::minimal::assignable>,
|
||||
test::minimal::allocator<test::minimal::assignable> >;
|
||||
|
Reference in New Issue
Block a user