mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Fixes #125 ("flat_map doc misleading complexity").
This commit is contained in:
@@ -1320,6 +1320,7 @@ use [*Boost.Container]? There are several reasons for that:
|
|||||||
[section:release_notes_boost_1_74_00 Boost 1.74 Release]
|
[section:release_notes_boost_1_74_00 Boost 1.74 Release]
|
||||||
|
|
||||||
* Fixed bugs/issues:
|
* Fixed bugs/issues:
|
||||||
|
* [@https://github.com/boostorg/container/issues/125 GitHub #125: ['"flat_map doc misleading complexity"]].
|
||||||
* [@https://github.com/boostorg/container/issues/126 GitHub #126: ['"flat_set.hpp and set.hpp in pmr have the same header guard"]].
|
* [@https://github.com/boostorg/container/issues/126 GitHub #126: ['"flat_set.hpp and set.hpp in pmr have the same header guard"]].
|
||||||
* [@https://github.com/boostorg/container/issues/128 GitHub #128: ['"moved from small_vector and static_vector calls destructor on elements in static part"]].
|
* [@https://github.com/boostorg/container/issues/128 GitHub #128: ['"moved from small_vector and static_vector calls destructor on elements in static part"]].
|
||||||
* [@https://github.com/boostorg/container/issues/129 GitHub #129: ['"Alias templates for small_flat_[multi]{set|map} using small_vector as container"]].
|
* [@https://github.com/boostorg/container/issues/129 GitHub #129: ['"Alias templates for small_flat_[multi]{set|map} using small_vector as container"]].
|
||||||
|
@@ -713,7 +713,7 @@ class flat_map
|
|||||||
//!
|
//!
|
||||||
//! Returns: A reference to the mapped_type corresponding to x in *this.
|
//! Returns: A reference to the mapped_type corresponding to x in *this.
|
||||||
//!
|
//!
|
||||||
//! Complexity: Logarithmic.
|
//! Complexity: Logarithmic search time plus linear insertion time in case no equivalent key is present.
|
||||||
mapped_type &operator[](const key_type& k);
|
mapped_type &operator[](const key_type& k);
|
||||||
|
|
||||||
//! Effects: If there is no key equivalent to x in the flat_map, inserts
|
//! Effects: If there is no key equivalent to x in the flat_map, inserts
|
||||||
@@ -721,8 +721,8 @@ class flat_map
|
|||||||
//!
|
//!
|
||||||
//! Returns: A reference to the mapped_type corresponding to x in *this.
|
//! Returns: A reference to the mapped_type corresponding to x in *this.
|
||||||
//!
|
//!
|
||||||
//! Complexity: Logarithmic.
|
//! Complexity: Logarithmic search time plus linear insertion time in case no equivalent key is present.
|
||||||
mapped_type &operator[](key_type &&k) ;
|
mapped_type &operator[](key_type &&k);
|
||||||
#elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
|
#elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
|
||||||
//in compilers like GCC 3.4, we can't catch temporaries
|
//in compilers like GCC 3.4, we can't catch temporaries
|
||||||
BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
|
BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
|
||||||
@@ -742,7 +742,7 @@ class flat_map
|
|||||||
//! Returns: The bool component is true if the insertion took place and false if the assignment
|
//! Returns: The bool component is true if the insertion took place and false if the assignment
|
||||||
//! took place. The iterator component is pointing at the element that was inserted or updated.
|
//! took place. The iterator component is pointing at the element that was inserted or updated.
|
||||||
//!
|
//!
|
||||||
//! Complexity: Logarithmic in the size of the container.
|
//! Complexity: Logarithmic search time plus linear insertion time in case no equivalent key is present.
|
||||||
template <class M>
|
template <class M>
|
||||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
|
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
|
||||||
{
|
{
|
||||||
@@ -955,7 +955,7 @@ class flat_map
|
|||||||
//! <b>Returns</b>: The bool component of the returned pair is true if and only if the
|
//! <b>Returns</b>: The bool component of the returned pair is true if and only if the
|
||||||
//! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
|
//! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
|
||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Logarithmic.
|
//! <b>Complexity</b>: Logarithmic search time plus linear insertion time in case the key is not present.
|
||||||
template <class... Args>
|
template <class... Args>
|
||||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
||||||
{
|
{
|
||||||
@@ -973,7 +973,7 @@ class flat_map
|
|||||||
//! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
|
//! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
|
||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
|
||||||
//! is inserted right before p.
|
//! is inserted right before p. Linear insertion time in case no equivalent key is present.
|
||||||
template <class... Args>
|
template <class... Args>
|
||||||
BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user