diff --git a/test/objects/cxx11_allocator.hpp b/test/objects/cxx11_allocator.hpp index e96f8d94..8f3a7711 100644 --- a/test/objects/cxx11_allocator.hpp +++ b/test/objects/cxx11_allocator.hpp @@ -13,7 +13,8 @@ #include "../helpers/fwd.hpp" #include "../helpers/memory.hpp" -namespace test { +namespace test +{ struct allocator_false { enum @@ -180,6 +181,10 @@ namespace test { ~cxx11_allocator_base() { detail::tracker.allocator_unref(); } +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) + cxx11_allocator_base& operator=(cxx11_allocator_base const& x) = default; +#endif + pointer address(reference r) { return pointer(&r); } const_pointer address(const_reference r) { return const_pointer(&r); } @@ -264,6 +269,10 @@ namespace test { cxx11_allocator(cxx11_allocator const& x) : cxx11_allocator_base(x) {} +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) + cxx11_allocator& operator=(cxx11_allocator const& x) = default; +#endif + // When not propagating swap, allocators are always equal // to avoid undefined behaviour. bool operator==(cxx11_allocator const& x) const @@ -307,6 +316,10 @@ namespace test { cxx11_allocator(cxx11_allocator const& x) : cxx11_allocator_base(x) {} +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) + cxx11_allocator& operator=(cxx11_allocator const& x) = default; +#endif + // When not propagating swap, allocators are always equal // to avoid undefined behaviour. bool operator==(cxx11_allocator const& x) const