23 Containers library [containers]

23.6 Container adaptors [container.adaptors]

23.6.12 Class template flat_multiset [flat.multiset]

23.6.12.5 Modifiers [flat.multiset.modifiers]

template<class. Args> constexpr iterator emplace(Args&&. args);
Effects: First, initializes an object t of type value_type with std​::​forward<Args>(args)., then inserts t as if by: auto it = ranges::upper_bound(c, t, compare); c.insert(it, std::move(t));
Returns: An iterator that points to the inserted element.
template<class InputIterator> constexpr void insert(InputIterator first, InputIterator last);
Effects: Adds elements to c as if by: c.insert(c.end(), first, last);
Then, sorts the range of newly inserted elements with respect to compare, and merges the resulting sorted range and the sorted range of pre-existing elements into a single sorted range.
Complexity: N +
Remarks: Since this operation performs an in-place merge, it may allocate memory.
template<class InputIterator> constexpr void insert(sorted_equivalent_t, InputIterator first, InputIterator last);
Complexity: Linear in N, where N is size() after the operation.
template<container-compatible-range<value_type> R> void insert_range(R&& rg);
Effects: Adds elements to c as if by: ranges::for_each(rg, [&](auto& e) { c.insert(c.end(), std::forward<decltype(e)>(e)); });
Then, sorts the range of newly inserted elements with respect to compare, and merges the resulting sorted range and the sorted range of pre-existing elements into a single sorted range.
Complexity: N +
Remarks: Since this operation performs an in-place merge, it may allocate memory.
template<container-compatible-range<value_type> R> constexpr void insert_range(sorted_equivalent_t, R&& rg);
Complexity: Linear in N, where N is size() after the operation.
constexpr void swap(flat_multiset& y) noexcept(is_nothrow_swappable_v<container_type> && is_nothrow_swappable_v<key_compare>);
Effects: Equivalent to: ranges::swap(compare, y.compare); ranges::swap(c, y.c);
constexpr container_type extract() &&;
Returns: std​::​move(c).
constexpr void replace(container_type&& cont);
Effects: Equivalent to: c = std​::​move(cont);

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant