diff --git a/source/containers.tex b/source/containers.tex index c2d1113887..e5a33d6a26 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -15207,87 +15207,89 @@ mapped_container_type values; }; - // \ref{flat.map.cons}, construct/copy/destroy + // \ref{flat.map.cons}, constructors flat_map() : flat_map(key_compare()) { } - template - flat_map(const flat_map&, const Allocator& a); - template - flat_map(flat_map&&, const Allocator& a); + explicit flat_map(const key_compare& comp) + : c(), compare(comp) { } flat_map(key_container_type key_cont, mapped_container_type mapped_cont, const key_compare& comp = key_compare()); - template - flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); - template - flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const key_compare& comp, const Allocator& a); flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont, const key_compare& comp = key_compare()); - template - flat_map(sorted_unique_t, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, const Allocator& a); - template - flat_map(sorted_unique_t, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, - const key_compare& comp, const Allocator& a); - - explicit flat_map(const key_compare& comp) - : c(), compare(comp) { } - template - flat_map(const key_compare& comp, const Allocator& a); - template - explicit flat_map(const Allocator& a); template flat_map(InputIterator first, InputIterator last, const key_compare& comp = key_compare()) : c(), compare(comp) { insert(first, last); } - template - flat_map(InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_map(InputIterator first, InputIterator last, const Allocator& a); + + template + flat_map(sorted_unique_t s, InputIterator first, InputIterator last, + const key_compare& comp = key_compare()) + : c(), compare(comp) { insert(s, first, last); } template<@\exposconcept{container-compatible-range}@ R> flat_map(from_range_t fr, R&& rg) : flat_map(fr, std::forward(rg), key_compare()) { } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_map(from_range_t, R&& rg, const Allocator& a); template<@\exposconcept{container-compatible-range}@ R> flat_map(from_range_t, R&& rg, const key_compare& comp) : flat_map(comp) { insert_range(std::forward(rg)); } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_map(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); - - template - flat_map(sorted_unique_t s, InputIterator first, InputIterator last, - const key_compare& comp = key_compare()) - : c(), compare(comp) { insert(s, first, last); } - template - flat_map(sorted_unique_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_map(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a); flat_map(initializer_list il, const key_compare& comp = key_compare()) : flat_map(il.begin(), il.end(), comp) { } - template - flat_map(initializer_list il, const key_compare& comp, const Allocator& a); - template - flat_map(initializer_list il, const Allocator& a); flat_map(sorted_unique_t s, initializer_list il, const key_compare& comp = key_compare()) : flat_map(s, il.begin(), il.end(), comp) { } - template + + // \ref{flat.map.cons.alloc}, constructors with allocators + + template + explicit flat_map(const Alloc& a); + template + flat_map(const key_compare& comp, const Alloc& a); + template + flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const Alloc& a); + template + flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const key_compare& comp, const Alloc& a); + template + flat_map(sorted_unique_t, const key_container_type& key_cont, + const mapped_container_type& mapped_cont, const Alloc& a); + template + flat_map(sorted_unique_t, const key_container_type& key_cont, + const mapped_container_type& mapped_cont, + const key_compare& comp, const Alloc& a); + template + flat_map(const flat_map&, const Alloc& a); + template + flat_map(flat_map&&, const Alloc& a); + template + flat_map(InputIterator first, InputIterator last, const Alloc& a); + template + flat_map(InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template + flat_map(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a); + template + flat_map(sorted_unique_t, InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_map(from_range_t, R&& rg, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_map(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); + template + flat_map(initializer_list il, const Alloc& a); + template + flat_map(initializer_list il, const key_compare& comp, const Alloc& a); + template + flat_map(sorted_unique_t, initializer_list il, const Alloc& a); + template flat_map(sorted_unique_t, initializer_list il, - const key_compare& comp, const Allocator& a); - template - flat_map(sorted_unique_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); - flat_map& operator=(initializer_list il); + flat_map& operator=(initializer_list); // iterators iterator begin() noexcept; @@ -15546,69 +15548,66 @@ \indexlibraryctor{flat_map}% \begin{itemdecl} -template - flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); -template - flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const key_compare& comp, const Allocator& a); +flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont, + const key_compare& comp = key_compare()); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true} and -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects -Equivalent to \tcode{flat_map(key_cont, mapped_cont)} and -\tcode{flat_map(key_cont, mapped_cont, comp)}, respectively, -except that \tcode{c.keys} and \tcode{c.values} are constructed with -uses-allocator construction\iref{allocator.uses.construction}. +Initializes +\tcode{c.keys} with \tcode{std::move(key_cont)}, +\tcode{c.values} with \tcode{std::move(mapped_cont)}, and +\tcode{compare} with \tcode{comp}. \pnum \complexity -Same as \tcode{flat_map(key_cont, mapped_cont)} and -\tcode{flat_map(key_cont, mapped_cont, comp)}, respectively. +Constant. \end{itemdescr} +\rSec3[flat.map.cons.alloc]{Constructors with allocators} + +\pnum +The constructors in this subclause shall not participate in overload resolution +unless \tcode{uses_allocator_v} is \tcode{true} +and \tcode{uses_allocator_v} is \tcode{true}. + \indexlibraryctor{flat_map}% \begin{itemdecl} -flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont, - const key_compare& comp = key_compare()); +template + flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const Alloc& a); +template + flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} \pnum \effects -Initializes -\tcode{c.keys} with \tcode{std::move(key_cont)}, -\tcode{c.values} with \tcode{std::move(mapped_cont)}, and -\tcode{compare} with \tcode{comp}. +Equivalent to \tcode{flat_map(key_cont, mapped_cont)} and +\tcode{flat_map(key_cont, mapped_cont, comp)}, respectively, +except that \tcode{c.keys} and \tcode{c.values} are constructed with +uses-allocator construction\iref{allocator.uses.construction}. \pnum \complexity -Constant. +Same as \tcode{flat_map(key_cont, mapped_cont)} and +\tcode{flat_map(key_cont, mapped_cont, comp)}, respectively. \end{itemdescr} \indexlibraryctor{flat_map}% \begin{itemdecl} -template +template flat_map(sorted_unique_t s, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, const Allocator& a); -template + const mapped_container_type& mapped_cont, const Alloc& a); +template flat_map(sorted_unique_t s, const key_container_type& key_cont, const mapped_container_type& mapped_cont, const key_compare& comp, - const Allocator& a); + const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true} and -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_map(s, key_cont, mapped_cont)} and @@ -15623,44 +15622,39 @@ \indexlibraryctor{flat_map}% \begin{itemdecl} -template - flat_map(const flat_map&, const Allocator& a); -template - flat_map(flat_map&&, const Allocator& a); -template - flat_map(const key_compare& comp, const Allocator& a); -template - explicit flat_map(const Allocator& a); -template - flat_map(InputIterator first, InputIterator last, const key_compare& comp, const Allocator& a); -template - flat_map(InputIterator first, InputIterator last, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_map(from_range_t, R&& rg, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_map(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); -template +template + explicit flat_map(const Alloc& a); +template + flat_map(const key_compare& comp, const Alloc& a); +template + flat_map(const flat_map&, const Alloc& a); +template + flat_map(flat_map&&, const Alloc& a); +template + flat_map(InputIterator first, InputIterator last, const Alloc& a); +template + flat_map(InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a); +template + flat_map(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a); +template flat_map(sorted_unique_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); -template - flat_map(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a); -template - flat_map(initializer_list il, const key_compare& comp, const Allocator& a); -template - flat_map(initializer_list il, const Allocator& a); -template + const key_compare& comp, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_map(from_range_t, R&& rg, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_map(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); +template + flat_map(initializer_list il, const Alloc& a); +template + flat_map(initializer_list il, const key_compare& comp, const Alloc& a); +template + flat_map(sorted_unique_t, initializer_list il, const Alloc& a); +template flat_map(sorted_unique_t, initializer_list il, - const key_compare& comp, const Allocator& a); -template - flat_map(sorted_unique_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true} and -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to the corresponding non-allocator constructors @@ -16396,92 +16390,94 @@ mapped_container_type values; }; - // \ref{flat.multimap.cons}, construct/copy/destroy + // \ref{flat.multimap.cons}, constructors flat_multimap() : flat_multimap(key_compare()) { } - template - flat_multimap(const flat_multimap&, const Allocator& a); - template - flat_multimap(flat_multimap&&, const Allocator& a); + explicit flat_multimap(const key_compare& comp) + : c(), compare(comp) { } flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont, const key_compare& comp = key_compare()); - template - flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); - template - flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const key_compare& comp, const Allocator& a); flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont, const key_compare& comp = key_compare()); - template - flat_multimap(sorted_equivalent_t, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, const Allocator& a); - template - flat_multimap(sorted_equivalent_t, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, - const key_compare& comp, const Allocator& a); - - explicit flat_multimap(const key_compare& comp) - : c(), compare(comp) { } - template - flat_multimap(const key_compare& comp, const Allocator& a); - template - explicit flat_multimap(const Allocator& a); template flat_multimap(InputIterator first, InputIterator last, const key_compare& comp = key_compare()) : c(), compare(comp) { insert(first, last); } - template - flat_multimap(InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_multimap(InputIterator first, InputIterator last, const Allocator& a); + + template + flat_multimap(sorted_equivalent_t s, InputIterator first, InputIterator last, + const key_compare& comp = key_compare()) + : c(), compare(comp) { insert(s, first, last); } template<@\exposconcept{container-compatible-range}@ R> flat_multimap(from_range_t fr, R&& rg) : flat_multimap(fr, std::forward(rg), key_compare()) { } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multimap(from_range_t, R&& rg, const Allocator& a); template<@\exposconcept{container-compatible-range}@ R> flat_multimap(from_range_t, R&& rg, const key_compare& comp) : flat_multimap(comp) { insert_range(std::forward(rg)); } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multimap(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); - - template - flat_multimap(sorted_equivalent_t s, InputIterator first, InputIterator last, - const key_compare& comp = key_compare()) - : c(), compare(comp) { insert(s, first, last); } - template - flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last, - const Allocator& a); flat_multimap(initializer_list il, const key_compare& comp = key_compare()) : flat_multimap(il.begin(), il.end(), comp) { } - template - flat_multimap(initializer_list il, const key_compare& comp, - const Allocator& a); - template - flat_multimap(initializer_list il, const Allocator& a); flat_multimap(sorted_equivalent_t s, initializer_list il, const key_compare& comp = key_compare()) : flat_multimap(s, il.begin(), il.end(), comp) { } - template + + // \ref{flat.multimap.cons.alloc}, constructors with allocators + + template + explicit flat_multimap(const Alloc& a); + template + flat_multimap(const key_compare& comp, const Alloc& a); + template + flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const Alloc& a); + template + flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const key_compare& comp, const Alloc& a); + template + flat_multimap(sorted_equivalent_t, const key_container_type& key_cont, + const mapped_container_type& mapped_cont, const Alloc& a); + template + flat_multimap(sorted_equivalent_t, const key_container_type& key_cont, + const mapped_container_type& mapped_cont, + const key_compare& comp, const Alloc& a); + template + flat_multimap(const flat_multimap&, const Alloc& a); + template + flat_multimap(flat_multimap&&, const Alloc& a); + template + flat_multimap(InputIterator first, InputIterator last, const Alloc& a); + template + flat_multimap(InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template + flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last, + const Alloc& a); + template + flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multimap(from_range_t, R&& rg, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multimap(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); + template + flat_multimap(initializer_list il, const Alloc& a); + template + flat_multimap(initializer_list il, const key_compare& comp, + const Alloc& a); + template + flat_multimap(sorted_equivalent_t, initializer_list il, const Alloc& a); + template flat_multimap(sorted_equivalent_t, initializer_list il, - const key_compare& comp, const Allocator& a); - template - flat_multimap(sorted_equivalent_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); - flat_multimap& operator=(initializer_list il); + flat_multimap& operator=(initializer_list); // iterators iterator begin() noexcept; @@ -16697,69 +16693,66 @@ \indexlibraryctor{flat_multimap}% \begin{itemdecl} -template - flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); -template - flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const key_compare& comp, const Allocator& a); +flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont, + const key_compare& comp = key_compare()); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true} and -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects -Equivalent to \tcode{flat_multimap(key_cont, mapped_cont)} and -\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively, -except that \tcode{c.keys} and \tcode{c.values} are constructed -with uses-allocator construction\iref{allocator.uses.construction}. +Initializes +\tcode{c.keys} with \tcode{std::move(key_cont)}, +\tcode{c.values} with \tcode{std::move(mapped_cont)}, and +\tcode{compare} with \tcode{comp}. \pnum \complexity -Same as \tcode{flat_multimap(key_cont, mapped_cont)} and -\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively. +Constant. \end{itemdescr} +\rSec3[flat.multimap.cons.alloc]{Constructors with allocators} + +\pnum +The constructors in this subclause shall not participate in overload resolution +unless \tcode{uses_allocator_v} is \tcode{true} +and \tcode{uses_allocator_v} is \tcode{true}. + \indexlibraryctor{flat_multimap}% \begin{itemdecl} -flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont, - const key_compare& comp = key_compare()); +template + flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const Alloc& a); +template + flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} \pnum \effects -Initializes -\tcode{c.keys} with \tcode{std::move(key_cont)}, -\tcode{c.values} with \tcode{std::move(mapped_cont)}, and -\tcode{compare} with \tcode{comp}. +Equivalent to \tcode{flat_multimap(key_cont, mapped_cont)} and +\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively, +except that \tcode{c.keys} and \tcode{c.values} are constructed +with uses-allocator construction\iref{allocator.uses.construction}. \pnum \complexity -Constant. +Same as \tcode{flat_multimap(key_cont, mapped_cont)} and +\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively. \end{itemdescr} \indexlibraryctor{flat_multimap}% \begin{itemdecl} -template +template flat_multimap(sorted_equivalent_t s, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, const Allocator& a); -template + const mapped_container_type& mapped_cont, const Alloc& a); +template flat_multimap(sorted_equivalent_t s, const key_container_type& key_cont, const mapped_container_type& mapped_cont, const key_compare& comp, - const Allocator& a); + const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true} and -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_multimap(s, key_cont, mapped_cont)} and @@ -16774,46 +16767,41 @@ \indexlibraryctor{flat_multimap}% \begin{itemdecl} -template - flat_multimap(const flat_multimap&, const Allocator& a); -template - flat_multimap(flat_multimap&&, const Allocator& a); -template - flat_multimap(const key_compare& comp, const Allocator& a); -template - explicit flat_multimap(const Allocator& a); -template +template + explicit flat_multimap(const Alloc& a); +template + flat_multimap(const key_compare& comp, const Alloc& a); +template + flat_multimap(const flat_multimap&, const Alloc& a); +template + flat_multimap(flat_multimap&&, const Alloc& a); +template + flat_multimap(InputIterator first, InputIterator last, const Alloc& a); +template flat_multimap(InputIterator first, InputIterator last, const key_compare& comp, - const Allocator& a); -template - flat_multimap(InputIterator first, InputIterator last, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multimap(from_range_t, R&& rg, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multimap(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); -template + const Alloc& a); +template flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); -template + const Alloc& a); +template flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last, - const Allocator& a); -template - flat_multimap(initializer_list il, const key_compare& comp, const Allocator& a); -template - flat_multimap(initializer_list il, const Allocator& a); -template + const key_compare& comp, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multimap(from_range_t, R&& rg, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multimap(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); +template + flat_multimap(initializer_list il, const Alloc& a); +template + flat_multimap(initializer_list il, const key_compare& comp, const Alloc& a); +template + flat_multimap(sorted_equivalent_t, initializer_list il, const Alloc& a); +template flat_multimap(sorted_equivalent_t, initializer_list il, - const key_compare& comp, const Allocator& a); -template - flat_multimap(sorted_equivalent_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true} and -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to the corresponding non-allocator constructors @@ -16969,79 +16957,81 @@ // \ref{flat.set.cons}, constructors flat_set() : flat_set(key_compare()) { } - template - flat_set(const flat_set&, const Allocator& a); - template - flat_set(flat_set&&, const Allocator& a); + explicit flat_set(const key_compare& comp) + : @\exposid{c}@(), @\exposid{compare}@(comp) { } explicit flat_set(container_type cont, const key_compare& comp = key_compare()); - template - flat_set(const container_type& cont, const Allocator& a); - template - flat_set(const container_type& cont, const key_compare& comp, const Allocator& a); flat_set(sorted_unique_t, container_type cont, const key_compare& comp = key_compare()) : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(comp) { } - template - flat_set(sorted_unique_t, const container_type& cont, const Allocator& a); - template - flat_set(sorted_unique_t, const container_type& cont, - const key_compare& comp, const Allocator& a); - - explicit flat_set(const key_compare& comp) - : @\exposid{c}@(), @\exposid{compare}@(comp) { } - template - flat_set(const key_compare& comp, const Allocator& a); - template - explicit flat_set(const Allocator& a); template flat_set(InputIterator first, InputIterator last, const key_compare& comp = key_compare()) : @\exposid{c}@(), @\exposid{compare}@(comp) { insert(first, last); } - template - flat_set(InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_set(InputIterator first, InputIterator last, const Allocator& a); + + template + flat_set(sorted_unique_t, InputIterator first, InputIterator last, + const key_compare& comp = key_compare()) + : @\exposid{c}@(first, last), @\exposid{compare}@(comp) { } template<@\exposconcept{container-compatible-range}@ R> flat_set(from_range_t fr, R&& rg) : flat_set(fr, std::forward(rg), key_compare()) { } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_set(from_range_t, R&& rg, const Allocator& a); template<@\exposconcept{container-compatible-range}@ R> flat_set(from_range_t, R&& rg, const key_compare& comp) : flat_set(comp) { insert_range(std::forward(rg)); } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_set(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); - - template - flat_set(sorted_unique_t, InputIterator first, InputIterator last, - const key_compare& comp = key_compare()) - : @\exposid{c}@(first, last), @\exposid{compare}@(comp) { } - template - flat_set(sorted_unique_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a); flat_set(initializer_list il, const key_compare& comp = key_compare()) : flat_set(il.begin(), il.end(), comp) { } - template - flat_set(initializer_list il, const key_compare& comp, const Allocator& a); - template - flat_set(initializer_list il, const Allocator& a); flat_set(sorted_unique_t s, initializer_list il, const key_compare& comp = key_compare()) : flat_set(s, il.begin(), il.end(), comp) { } - template + + // \ref{flat.set.cons.alloc}, constructors with allocators + + template + explicit flat_set(const Alloc& a); + template + flat_set(const key_compare& comp, const Alloc& a); + template + flat_set(const container_type& cont, const Alloc& a); + template + flat_set(const container_type& cont, const key_compare& comp, const Alloc& a); + template + flat_set(sorted_unique_t, const container_type& cont, const Alloc& a); + template + flat_set(sorted_unique_t, const container_type& cont, + const key_compare& comp, const Alloc& a); + template + flat_set(const flat_set&, const Alloc& a); + template + flat_set(flat_set&&, const Alloc& a); + template + flat_set(InputIterator first, InputIterator last, const Alloc& a); + template + flat_set(InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template + flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a); + template + flat_set(sorted_unique_t, InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_set(from_range_t, R&& rg, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); + template + flat_set(initializer_list il, const Alloc& a); + template + flat_set(initializer_list il, const key_compare& comp, const Alloc& a); + template + flat_set(sorted_unique_t, initializer_list il, const Alloc& a); + template flat_set(sorted_unique_t, initializer_list il, - const key_compare& comp, const Allocator& a); - template - flat_set(sorted_unique_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); flat_set& operator=(initializer_list); @@ -17226,23 +17216,25 @@ \pnum \complexity -Linear in $N$ if \tcode{cont} is sorted with respect to \exposid{compare} and +Linear in $N$ if \tcode{cont} is already sorted with respect to \exposid{compare} and otherwise $N \log N$, where $N$ is the value of \tcode{cont.size()} before this call. \end{itemdescr} +\rSec3[flat.set.cons.alloc]{Constructors with allocators} + +\pnum +The constructors in this subclause shall not participate in overload resolution +unless \tcode{uses_allocator_v} is \tcode{true}. + \indexlibraryctor{flat_set}% \begin{itemdecl} -template - flat_set(const container_type& cont, const Allocator& a); -template - flat_set(const container_type& cont, const key_compare& comp, const Allocator& a); +template + flat_set(const container_type& cont, const Alloc& a); +template + flat_set(const container_type& cont, const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to @@ -17257,18 +17249,14 @@ \indexlibraryctor{flat_set}% \begin{itemdecl} -template - flat_set(sorted_unique_t s, const container_type& cont, const Allocator& a); -template +template + flat_set(sorted_unique_t s, const container_type& cont, const Alloc& a); +template flat_set(sorted_unique_t s, const container_type& cont, - const key_compare& comp, const Allocator& a); + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to @@ -17283,43 +17271,39 @@ \indexlibraryctor{flat_set}% \begin{itemdecl} -template - flat_set(const flat_set&, const Allocator& a); -template - flat_set(flat_set&&, const Allocator& a); -template - flat_set(const key_compare& comp, const Allocator& a); -template - explicit flat_set(const Allocator& a); -template - flat_set(InputIterator first, InputIterator last, const key_compare& comp, const Allocator& a); -template - flat_set(InputIterator first, InputIterator last, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_set(from_range_t, R&& rg, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_set(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); -template +template + explicit flat_set(const Alloc& a); +template + flat_set(const key_compare& comp, const Alloc& a); +template + flat_set(const flat_set&, const Alloc& a); +template + flat_set(flat_set&&, const Alloc& a); +template + flat_set(InputIterator first, InputIterator last, const Alloc& a); +template + flat_set(InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a); +template + flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a); +template flat_set(sorted_unique_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); -template - flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a); -template - flat_set(initializer_list il, const key_compare& comp, const Allocator& a); -template - flat_set(initializer_list il, const Allocator& a); -template + const key_compare& comp, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_set(from_range_t, R&& rg, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); +template + flat_set(initializer_list il, const Alloc& a); +template + flat_set(initializer_list il, const key_compare& comp, const Alloc& a); +template + flat_set(sorted_unique_t, initializer_list il, const Alloc& a); +template flat_set(sorted_unique_t, initializer_list il, - const key_compare& comp, const Allocator& a); -template - flat_set(sorted_unique_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to the corresponding non-allocator constructors @@ -17632,83 +17616,85 @@ // \ref{flat.multiset.cons}, constructors flat_multiset() : flat_multiset(key_compare()) { } - template - flat_multiset(const flat_multiset&, const Allocator& a); - template - flat_multiset(flat_multiset&&, const Allocator& a); + explicit flat_multiset(const key_compare& comp) + : @\exposid{c}@(), @\exposid{compare}@(comp) { } explicit flat_multiset(container_type cont, const key_compare& comp = key_compare()); - template - flat_multiset(const container_type& cont, const Allocator& a); - template - flat_multiset(const container_type& cont, const key_compare& comp, const Allocator& a); flat_multiset(sorted_equivalent_t, container_type cont, const key_compare& comp = key_compare()) : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(comp) { } - template - flat_multiset(sorted_equivalent_t, const container_type& cont, const Allocator& a); - template - flat_multiset(sorted_equivalent_t, const container_type& cont, - const key_compare& comp, const Allocator& a); - - explicit flat_multiset(const key_compare& comp) - : @\exposid{c}@(), @\exposid{compare}@(comp) { } - template - flat_multiset(const key_compare& comp, const Allocator& a); - template - explicit flat_multiset(const Allocator& a); template flat_multiset(InputIterator first, InputIterator last, const key_compare& comp = key_compare()) : @\exposid{c}@(), @\exposid{compare}@(comp) { insert(first, last); } - template - flat_multiset(InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_multiset(InputIterator first, InputIterator last, const Allocator& a); + + template + flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, + const key_compare& comp = key_compare()) + : @\exposid{c}@(first, last), @\exposid{compare}@(comp) { } template<@\exposconcept{container-compatible-range}@ R> flat_multiset(from_range_t fr, R&& rg) : flat_multiset(fr, std::forward(rg), key_compare()) { } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multiset(from_range_t, R&& rg, const Allocator& a); template<@\exposconcept{container-compatible-range}@ R> flat_multiset(from_range_t, R&& rg, const key_compare& comp) : flat_multiset(comp) { insert_range(std::forward(rg)); } - template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multiset(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); - - template - flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, - const key_compare& comp = key_compare()) - : @\exposid{c}@(first, last), @\exposid{compare}@(comp) { } - template - flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); - template - flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, - const Allocator& a); flat_multiset(initializer_list il, const key_compare& comp = key_compare()) : flat_multiset(il.begin(), il.end(), comp) { } - template - flat_multiset(initializer_list il, const key_compare& comp, - const Allocator& a); - template - flat_multiset(initializer_list il, const Allocator& a); flat_multiset(sorted_equivalent_t s, initializer_list il, const key_compare& comp = key_compare()) : flat_multiset(s, il.begin(), il.end(), comp) { } - template + + // \ref{flat.multiset.cons.alloc}, constructors with allocators + + template + explicit flat_multiset(const Alloc& a); + template + flat_multiset(const key_compare& comp, const Alloc& a); + template + flat_multiset(const container_type& cont, const Alloc& a); + template + flat_multiset(const container_type& cont, const key_compare& comp, const Alloc& a); + template + flat_multiset(sorted_equivalent_t, const container_type& cont, const Alloc& a); + template + flat_multiset(sorted_equivalent_t, const container_type& cont, + const key_compare& comp, const Alloc& a); + template + flat_multiset(const flat_multiset&, const Alloc& a); + template + flat_multiset(flat_multiset&&, const Alloc& a); + template + flat_multiset(InputIterator first, InputIterator last, const Alloc& a); + template + flat_multiset(InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template + flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, + const Alloc& a); + template + flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, + const key_compare& comp, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multiset(from_range_t, R&& rg, const Alloc& a); + template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multiset(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); + template + flat_multiset(initializer_list il, const Alloc& a); + template + flat_multiset(initializer_list il, const key_compare& comp, + const Alloc& a); + template + flat_multiset(sorted_equivalent_t, initializer_list il, const Alloc& a); + template flat_multiset(sorted_equivalent_t, initializer_list il, - const key_compare& comp, const Allocator& a); - template - flat_multiset(sorted_equivalent_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); flat_multiset& operator=(initializer_list); @@ -17890,23 +17876,25 @@ \pnum \complexity -Linear in $N$ if \tcode{cont} is sorted with respect to \exposid{compare} and +Linear in $N$ if \tcode{cont} is already sorted with respect to \exposid{compare} and otherwise $N \log N$, where $N$ is the value of \tcode{cont.size()} before this call. \end{itemdescr} +\rSec3[flat.multiset.cons.alloc]{Constructors with allocators} + +\pnum +The constructors in this subclause shall not participate in overload resolution +unless \tcode{uses_allocator_v} is \tcode{true}. + \indexlibraryctor{flat_multiset}% \begin{itemdecl} -template - flat_multiset(const container_type& cont, const Allocator& a); -template - flat_multiset(const container_type& cont, const key_compare& comp, const Allocator& a); +template + flat_multiset(const container_type& cont, const Alloc& a); +template + flat_multiset(const container_type& cont, const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_multiset(cont)} and @@ -17922,18 +17910,14 @@ \indexlibraryctor{flat_multiset}% \begin{itemdecl} -template - flat_multiset(sorted_equivalent_t s, const container_type& cont, const Allocator& a); -template +template + flat_multiset(sorted_equivalent_t s, const container_type& cont, const Alloc& a); +template flat_multiset(sorted_equivalent_t s, const container_type& cont, - const key_compare& comp, const Allocator& a); + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_multiset(s, cont)} and @@ -17948,44 +17932,40 @@ \indexlibraryctor{flat_multiset}% \begin{itemdecl} -template - flat_multiset(const flat_multiset&, const Allocator& a); -template - flat_multiset(flat_multiset&&, const Allocator& a); -template - flat_multiset(const key_compare& comp, const Allocator& a); -template - explicit flat_multiset(const Allocator& a); -template +template + explicit flat_multiset(const Alloc& a); +template + flat_multiset(const key_compare& comp, const Alloc& a); +template + flat_multiset(const flat_multiset&, const Alloc& a); +template + flat_multiset(flat_multiset&&, const Alloc& a); +template + flat_multiset(InputIterator first, InputIterator last, const Alloc& a); +template flat_multiset(InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); -template - flat_multiset(InputIterator first, InputIterator last, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multiset(from_range_t, R&& rg, const Allocator& a); -template<@\exposconcept{container-compatible-range}@ R, class Allocator> - flat_multiset(from_range_t, R&& rg, const key_compare& comp, const Allocator& a); -template + const key_compare& comp, const Alloc& a); +template + flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, const Alloc& a); +template flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, - const key_compare& comp, const Allocator& a); -template - flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, const Allocator& a); -template - flat_multiset(initializer_list il, const key_compare& comp, const Allocator& a); -template - flat_multiset(initializer_list il, const Allocator& a); -template + const key_compare& comp, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multiset(from_range_t, R&& rg, const Alloc& a); +template<@\exposconcept{container-compatible-range}@ R, class Alloc> + flat_multiset(from_range_t, R&& rg, const key_compare& comp, const Alloc& a); +template + flat_multiset(initializer_list il, const Alloc& a); +template + flat_multiset(initializer_list il, const key_compare& comp, const Alloc& a); +template + flat_multiset(sorted_equivalent_t, initializer_list il, const Alloc& a); +template flat_multiset(sorted_equivalent_t, initializer_list il, - const key_compare& comp, const Allocator& a); -template - flat_multiset(sorted_equivalent_t, initializer_list il, const Allocator& a); + const key_compare& comp, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to the corresponding non-allocator constructors