Fixes #141 ('small_vector does not propagate no throw properties of move operation of contained type')

This commit is contained in:
Ion Gaztañaga
2020-12-30 00:19:22 +01:00
parent f50195524f
commit b17dabf47a
2 changed files with 2 additions and 1 deletions

View File

@@ -1343,6 +1343,7 @@ use [*Boost.Container]? There are several reasons for that:
* Added [[no-discard]] attribute in all containers to catch bugs related to unused return values.
* Fixed bugs/issues:
* [@https://github.com/boostorg/container/issues/139 GitHub #139: ['"flat_map merge and iterators"]].
* [@https://github.com/boostorg/container/issues/141 GitHub #141: ['"small_vector does not propagate no throw properties of move operation of contained type"]].
* [@https://github.com/boostorg/container/issues/164 GitHub #164: ['"Compile error when using `pmr::map` with a `std::pair`; works when using a `std::tuple`"]].
* [@https://github.com/boostorg/container/issues/171 GitHub #171: ['"deque::clear() uses undefined behaviour"]].

View File

@@ -653,7 +653,7 @@ class small_vector : public small_vector_base<T, Allocator, Options>
{ 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)
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<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()); }