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:
Daniel James
2016-10-17 07:54:06 +01:00
parent 82438a513b
commit 7da307c696

View File

@ -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)