forked from boostorg/unordered
Supply explicit test::cxx11_allocator::rebind for old GCC
The rebind mechanism doesn't work for templates with multiple template parameters on old versions of GCC. But allocators written for that compiler will have an explicit rebind, so that should be acceptable.
This commit is contained in:
@ -201,9 +201,11 @@ namespace test
|
||||
public move_allocator_base<Flags>,
|
||||
Flags
|
||||
{
|
||||
//template <typename U> struct rebind {
|
||||
// typedef cxx11_allocator<U, Flags> other;
|
||||
//};
|
||||
#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 402000)
|
||||
template <typename U> struct rebind {
|
||||
typedef cxx11_allocator<U, Flags> other;
|
||||
};
|
||||
#endif
|
||||
|
||||
explicit cxx11_allocator(int t = 0)
|
||||
: cxx11_allocator_base<T>(t)
|
||||
@ -251,9 +253,11 @@ namespace test
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 402000)
|
||||
template <typename U> struct rebind {
|
||||
typedef cxx11_allocator<U, Flags> other;
|
||||
};
|
||||
#endif
|
||||
|
||||
explicit cxx11_allocator(int t = 0)
|
||||
: cxx11_allocator_base<T>(t)
|
||||
|
Reference in New Issue
Block a user