diff --git a/doc/container.qbk b/doc/container.qbk index a87742d..9528e83 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -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"]]. diff --git a/include/boost/container/small_vector.hpp b/include/boost/container/small_vector.hpp index 6f5c050..c0edac8 100644 --- a/include/boost/container/small_vector.hpp +++ b/include/boost/container/small_vector.hpp @@ -608,6 +608,7 @@ class small_vector : public small_vector_base { 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) : 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 { return static_cast(this->base_type::operator=(static_cast(other))); } BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(small_vector) other) + BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable::value + && (allocator_traits_type::propagate_on_container_move_assignment::value + || allocator_traits_type::is_always_equal::value)) { return static_cast(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); } BOOST_CONTAINER_FORCEINLINE small_vector& operator=(const base_type &other) diff --git a/include/boost/container/static_vector.hpp b/include/boost/container/static_vector.hpp index f230763..059640e 100644 --- a/include/boost/container/static_vector.hpp +++ b/include/boost/container/static_vector.hpp @@ -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) { return static_cast(base_t::operator=(BOOST_MOVE_BASE(base_t, other))); }