Remove unnecessary move support

This commit is contained in:
LeonineKing1199 2021-11-23 10:57:26 -08:00
parent fe439890e8
commit 6984e6a4f2

View File

@ -179,17 +179,6 @@ namespace test
detail::tracker.allocator_ref();
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
cxx11_allocator_base(cxx11_allocator_base&& x) BOOST_NOEXCEPT
{
tag_ = x.tag_;
selected_ = x.selected_;
x.tag_ = -1;
x.selected_ = -1;
}
#endif
~cxx11_allocator_base() { detail::tracker.allocator_unref(); }
cxx11_allocator_base& operator=(cxx11_allocator_base const& x)
@ -199,17 +188,6 @@ namespace test
return *this;
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
cxx11_allocator_base& operator=(
cxx11_allocator_base&& x) BOOST_NOEXCEPT
{
tag_ = x.tag_;
selected_ = x.selected_;
return *this;
}
#endif
pointer address(reference r) { return pointer(&r); }
const_pointer address(const_reference r) { return const_pointer(&r); }
@ -300,14 +278,6 @@ namespace test
return *this;
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
cxx11_allocator& operator=(cxx11_allocator&& x) BOOST_NOEXCEPT
{
cxx11_allocator_base<T>::operator=(static_cast<cxx11_allocator&&>(x));
return *this;
}
#endif
// When not propagating swap, allocators are always equal
// to avoid undefined behaviour.
bool operator==(cxx11_allocator const& x) const
@ -357,14 +327,6 @@ namespace test
return *this;
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
cxx11_allocator& operator=(cxx11_allocator&& x) BOOST_NOEXCEPT
{
cxx11_allocator_base<T>::operator=(static_cast<cxx11_allocator&&>(x));
return *this;
}
#endif
// When not propagating swap, allocators are always equal
// to avoid undefined behaviour.
bool operator==(cxx11_allocator const& x) const