From 7da307c696cf0299826e150061c12e21d62c2cf1 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 17 Oct 2016 07:54:06 +0100 Subject: [PATCH] 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. --- test/objects/cxx11_allocator.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/objects/cxx11_allocator.hpp b/test/objects/cxx11_allocator.hpp index 1c638be2..8ace50c5 100644 --- a/test/objects/cxx11_allocator.hpp +++ b/test/objects/cxx11_allocator.hpp @@ -201,9 +201,11 @@ namespace test public move_allocator_base, Flags { - //template struct rebind { - // typedef cxx11_allocator other; - //}; +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 402000) + template struct rebind { + typedef cxx11_allocator other; + }; +#endif explicit cxx11_allocator(int t = 0) : cxx11_allocator_base(t) @@ -251,9 +253,11 @@ namespace test return tmp; } +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 402000) template struct rebind { typedef cxx11_allocator other; }; +#endif explicit cxx11_allocator(int t = 0) : cxx11_allocator_base(t)