forked from boostorg/unordered
Unordered: Merge unordered from trunk.
- Activate `std::allocator_traits` for gcc 4.7 and Visual C++ 11. - Implement variadic construct in `boost::unordered::detail::allocator_traits` when variadics, rvalue references and SFINAE expression are available. - Use variadic construct from `allocator_traits`, or when not available move the logic for constructing `value_type` to a lower level, so the container code is a bit simpler. - Avoid `-Wshadow` warnings. Fixes #6190. - Implement `reserve`. Fixes #6857. [SVN r78432]
This commit is contained in:
@@ -500,6 +500,7 @@ namespace unordered
|
||||
float load_factor() const;
|
||||
void max_load_factor(float);
|
||||
void rehash(size_type);
|
||||
void reserve(size_type);
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
friend bool operator==<T,H,P,A>(
|
||||
@@ -972,6 +973,7 @@ namespace unordered
|
||||
float load_factor() const;
|
||||
void max_load_factor(float);
|
||||
void rehash(size_type);
|
||||
void reserve(size_type);
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
friend bool operator==<T,H,P,A>(
|
||||
@@ -1226,6 +1228,12 @@ namespace unordered
|
||||
table_.rehash(n);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
void unordered_set<T,H,P,A>::reserve(size_type n)
|
||||
{
|
||||
table_.reserve(n);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
inline bool operator==(
|
||||
unordered_set<T,H,P,A> const& m1,
|
||||
@@ -1504,6 +1512,12 @@ namespace unordered
|
||||
table_.rehash(n);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
void unordered_multiset<T,H,P,A>::reserve(size_type n)
|
||||
{
|
||||
table_.reserve(n);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
inline bool operator==(
|
||||
unordered_multiset<T,H,P,A> const& m1,
|
||||
|
||||
Reference in New Issue
Block a user