mirror of
https://github.com/boostorg/container.git
synced 2025-08-01 13:34:30 +02:00
Fix GitHub #79 ("Mark small_vector move operations noexcept")
This commit is contained in:
@@ -1252,6 +1252,7 @@ use [*Boost.Container]? There are several reasons for that:
|
||||
* Fixed serious bug in heterogeneous lookup functions (is_transparent was broken).
|
||||
|
||||
* Fixed bugs:
|
||||
* [@https://github.com/boostorg/container/issues/79 GitHub #79: ['"Mark small_vector move operations noexcept"]].
|
||||
* [@https://github.com/boostorg/container/issues/82 GitHub #82: ['"Function definition in header file"]].
|
||||
* [@https://github.com/boostorg/container/issues/83 GitHub #83: ['"Iterator zero incrementing leads to assert on empty vector"]].
|
||||
* [@https://github.com/boostorg/container/pull/85 GitHub #85: ['"container: misc-typos"]].
|
||||
|
@@ -608,6 +608,7 @@ class small_vector : public small_vector_base<T, Allocator>
|
||||
{ this->move_construct_impl(other, other.get_stored_allocator()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable<value_type>::value)
|
||||
: base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
|
||||
{ this->move_construct_impl(other, other.get_stored_allocator()); }
|
||||
|
||||
@@ -627,6 +628,9 @@ class small_vector : public small_vector_base<T, Allocator>
|
||||
{ return static_cast<small_vector&>(this->base_type::operator=(static_cast<base_type const&>(other))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(small_vector) other)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable<value_type>::value
|
||||
&& (allocator_traits_type::propagate_on_container_move_assignment::value
|
||||
|| allocator_traits_type::is_always_equal::value))
|
||||
{ return static_cast<small_vector&>(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE small_vector& operator=(const base_type &other)
|
||||
|
@@ -372,6 +372,7 @@ public:
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF(static_vector) other)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable<value_type>::value)
|
||||
{
|
||||
return static_cast<static_vector&>(base_t::operator=(BOOST_MOVE_BASE(base_t, other)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user