Fixes #139 ("flat_map merge and iterators").

This commit is contained in:
Ion Gaztañaga
2020-11-14 00:10:46 +01:00
parent ae93df82ea
commit 93bbf37dad
2 changed files with 5 additions and 18 deletions

View File

@@ -1342,8 +1342,9 @@ 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/171 GitHub #171: ['"deque::clear() uses undefined behaviour"]].
* [@https://github.com/boostorg/container/issues/139 GitHub #139: ['"flat_map merge and iterators"]].
* [@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"]].
[endsect]

View File

@@ -1211,16 +1211,9 @@ class flat_map
//! <b>Requires</b>: this->get_allocator() == source.get_allocator().
//!
//! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
//! <b>Effects</b>: Move-inserts each element from source into *this a using
//! the comparison object of *this. If there is an element in a with key equivalent to the
//! key of an element from source, then that element is not extracted from source.
//!
//! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
//! to those same elements but as members of *this. Iterators referring to the transferred
//! elements will continue to refer to their elements, but they now behave as iterators into *this,
//! not into source.
//!
//! <b>Throws</b>: Nothing unless the comparison object throws.
//! key of an element from source, then that element is not moved from source.
//!
//! <b>Complexity</b>: N log(size() + N) (N has the value source.size())
template<class C2>
@@ -2580,16 +2573,9 @@ class flat_multimap
//! <b>Requires</b>: this->get_allocator() == source.get_allocator().
//!
//! <b>Effects</b>: Extracts each element in source and insert it into a using
//! <b>Effects</b>: Move-inserts each element from source into *this a using
//! the comparison object of *this.
//!
//! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
//! to those same elements but as members of *this. Iterators referring to the transferred
//! elements will continue to refer to their elements, but they now behave as iterators into *this,
//! not into source.
//!
//! <b>Throws</b>: Nothing unless the comparison object throws.
//!
//! <b>Complexity</b>: N log(size() + N) (N has the value source.size())
template<class C2>
BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)