std::flat_multiset<Key,Compare,KeyContainer>::flat_multiset
: flat_multiset(key_compare()) { }
flat_multiset( const flat_multiset& other, const Allocator& alloc );
flat_multiset( flat_multiset&& other, const Allocator& alloc );
const key_compare& comp = key_compare() );
flat_multiset( const container_type& cont, const Allocator& alloc );
flat_multiset( const container_type& cont, const key_compare& comp,
const key_compare& comp = key_compare() )
flat_multiset( std::sorted_equivalent_t s, const container_type& cont,
flat_multiset( std::sorted_equivalent_t s, const container_type& cont,
: c(), compare(comp) { }
flat_multiset( const key_compare& comp, const Allocator& alloc );
explicit flat_multiset( const Allocator& alloc );
flat_multiset( InputIter first, InputIter last,
const key_compare& comp = key_compare() )
flat_multiset( InputIter first, InputIter last,
flat_multiset( InputIter first, InputIter last, const Allocator& alloc );
flat_multiset( std::from_range_t, R&& rg, const key_compare& comp )
flat_multiset( std::from_range_t fr, R&& rg )
flat_multiset( std::from_range_t, R&& rg, const Allocator& alloc );
flat_multiset( std::from_range_t, R&& rg, const key_compare& comp,
flat_multiset( std::sorted_equivalent_t s, InputIter first, InputIter last,
const key_compare& comp = key_compare() )
flat_multiset( std::sorted_equivalent_t s, InputIter first, InputIter last,
flat_multiset( std::sorted_equivalent_t s, InputIter first, InputIter last,
const key_compare& comp = key_compare() )
flat_multiset( std::initializer_list <value_type> init, const key_compare& comp,
flat_multiset( std::initializer_list <value_type> init, const Allocator& alloc );
const key_compare& comp = key_compare() )
flat_multiset( std::sorted_equivalent_t s, std::initializer_list <value_type> init,
flat_multiset( std::sorted_equivalent_t s, std::initializer_list <value_type> init,
Constructs new container adaptor from a variety of data sources and optionally provided comparison function object comp and/or allocator alloc.
c
with the copy of the contents of other.c and compare
with other.compare.
See allocator usage note below.c
with std::move(cont) and compare
with comp. Then sorts the c
with respect to comp
.c
with std::move(cont) and compare
with comp.[
first,
last)
, equivalent to insert(first, last);.c
with the contents of rg as if by insert_range(std::forward <R>(rg));.[
first,
last)
. Initializes c
with c(first, last) and compare
with compare(comp).Note for overloads (13-15,20-22): If [
first,
last)
is not a valid range, the behavior is undefined.
[edit] Allocator usage note
The constructors (2,3,5,6,8,9,11,12,14,15,17,19,21,22,24,25,27,28) are equivalent to the corresponding non-allocator constructors except that c
is constructed with uses-allocator construction.
These overloads participate in overload resolution only if std::uses_allocator_v <container_type, Allocator> is true.
[edit] Parameters
flat_multiset
to be used as source to initialize the elements of the underlying container with
input_range
whose elements are convertible to value_type
) to be used as source to initialize the underlying container
compare
InputIt
must meet the requirements of LegacyInputIterator.
Compare
must meet the requirements of Compare.
Allocator
must meet the requirements of Allocator.
[edit] Complexity
[
first,
last)
is sorted with respect to compare, otherwise \(\scriptsize \mathcal{O}(N\cdot\log{(N)})\)O(N·log(N)), where \(\scriptsize N\)N is the value of cont.size() before this call.[
first,
last)
.[edit] Exceptions
Calls to Allocator::allocate
may throw.
[edit] Notes
After container move construction (overload (3)), references, pointers, and iterators (other than the end iterator) to other remain valid, but refer to elements that are now in *this. The current standard makes this guarantee via the blanket statement in [container.reqmts]/67, and a more direct guarantee is under consideration via LWG issue 2321.
[edit] Example
Reason: no example