4.5 KiB
[flat.set.cons.alloc]
23 Containers library [containers]
23.6 Container adaptors [container.adaptors]
23.6.11 Class template flat_set [flat.set]
23.6.11.4 Constructors with allocators [flat.set.cons.alloc]
The constructors in this subclause shall not participate in overload resolution unless uses_allocator_v<container_type, Alloc> is true.
template<class Alloc> constexpr flat_set(const container_type& cont, const Alloc& a); template<class Alloc> constexpr flat_set(const container_type& cont, const key_compare& comp, const Alloc& a);
Effects: Equivalent toflat_set(cont) and flat_set(cont, comp), respectively, except that c is constructed with uses-allocator construction ([allocator.uses.construction]).
Complexity: Same as flat_set(cont) and flat_set(cont, comp), respectively.
template<class Alloc> constexpr flat_set(sorted_unique_t, const container_type& cont, const Alloc& a); template<class Alloc> constexpr flat_set(sorted_unique_t, const container_type& cont, const key_compare& comp, const Alloc& a);
Effects: Equivalent toflat_set(sorted_unique, cont) andflat_set(sorted_unique, cont,
comp), respectively,
except that c is constructed with
uses-allocator construction ([allocator.uses.construction]).
Complexity: Linear.
template<class Alloc> constexpr explicit flat_set(const Alloc& a); template<class Alloc> constexpr flat_set(const key_compare& comp, const Alloc& a); template<class Alloc> constexpr flat_set(const flat_set&, const Alloc& a); template<class Alloc> constexpr flat_set(flat_set&&, const Alloc& a); template<class InputIterator, class Alloc> constexpr flat_set(InputIterator first, InputIterator last, const Alloc& a); template<class InputIterator, class Alloc> constexpr flat_set(InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a); template<class InputIterator, class Alloc> constexpr flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a); template<class InputIterator, class Alloc> constexpr flat_set(sorted_unique_t, InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a); template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<value_type> R, class Alloc> constexpr flat_set(from_range_t, R&& rg, const Alloc& a); template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<value_type> R, class Alloc> constexpr flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); template<class Alloc> constexpr flat_set(initializer_list<value_type> il, const Alloc& a); template<class Alloc> constexpr flat_set(initializer_list<value_type> il, const key_compare& comp, const Alloc& a); template<class Alloc> constexpr flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a); template<class Alloc> constexpr flat_set(sorted_unique_t, initializer_list<value_type> il, const key_compare& comp, const Alloc& a);
Effects: Equivalent to the corresponding non-allocator constructors except that c is constructed with uses-allocator construction ([allocator.uses.construction]).