diff --git a/source/containers.tex b/source/containers.tex index 7a15185cc8..896a1ee878 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -14724,71 +14724,75 @@ mapped_container_type values; }; - // \ref{flat.map.cons}, construct/copy/destroy + // \ref{flat.map.cons}, constructors flat_map() : flat_map(key_compare()) { } - flat_map(key_container_type key_cont, mapped_container_type mapped_cont); - template - flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); - - flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont); - template - flat_map(sorted_unique_t, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, 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); + + flat_map(key_container_type key_cont, mapped_container_type mapped_cont); + flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont); 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<@\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(sorted_unique_t, const key_container_type& key_cont, + const mapped_container_type& mapped_cont, 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); @@ -15033,58 +15037,55 @@ \indexlibraryctor{flat_map}% \begin{itemdecl} -template - flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); +flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont); \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)}, -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)} and +\tcode{c.values} with \tcode{std::move(mapped_cont)}; +value-initializes \tcode{compare}. \pnum \complexity -Same as \tcode{flat_map(key_cont, mapped_cont)}. +Constant. \end{itemdescr} +\rSec3[flat.map.cons.alloc]{Constructors with allocators} + +\pnum +If \tcode{uses_allocator_v} is \tcode{false} +or \tcode{uses_allocator_v} is \tcode{false} +the constructors in this subclause shall not participate in overload resolution. + \indexlibraryctor{flat_map}% \begin{itemdecl} -flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont); +template + flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const Alloc& a); \end{itemdecl} \begin{itemdescr} \pnum \effects -Initializes \tcode{c.keys} with \tcode{std::move(key_cont)} and -\tcode{c.values} with \tcode{std::move(mapped_cont)}; -value-initializes \tcode{compare}. +Equivalent to \tcode{flat_map(key_cont, mapped_cont)}, +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)}. \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); + const mapped_container_type& mapped_cont, 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)}, @@ -15098,40 +15099,35 @@ \indexlibraryctor{flat_map}% \begin{itemdecl} -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(InputIterator first, InputIterator last, const Alloc& a); +template + flat_map(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(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 + 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}. - \pnum \effects Equivalent to the corresponding non-allocator constructors @@ -15867,76 +15863,80 @@ mapped_container_type values; }; - // \ref{flat.multimap.cons}, construct/copy/destroy + // \ref{flat.multimap.cons}, constructors flat_multimap() : flat_multimap(key_compare()) { } - flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont); - template - flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - 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); flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont); - template - flat_multimap(sorted_equivalent_t, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, 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(sorted_equivalent_t, const key_container_type& key_cont, + const mapped_container_type& mapped_cont, 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); @@ -16134,58 +16134,55 @@ \indexlibraryctor{flat_multimap}% \begin{itemdecl} -template - flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, - const Allocator& a); +flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont); \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)}, -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)} and +\tcode{c.values} with \tcode{std::move(mapped_cont)}; +value-initializes \tcode{compare}. \pnum \complexity -Same as \tcode{flat_multimap(key_cont, mapped_cont)}. +Constant. \end{itemdescr} +\rSec3[flat.multimap.cons.alloc]{Constructors with allocators} + +\pnum +If \tcode{uses_allocator_v} is \tcode{false} +or \tcode{uses_allocator_v} is \tcode{false} +the constructors in this subclause shall not participate in overload resolution. + \indexlibraryctor{flat_multimap}% \begin{itemdecl} -flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont); +template + flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont, + const Alloc& a); \end{itemdecl} \begin{itemdescr} \pnum \effects -Initializes \tcode{c.keys} with \tcode{std::move(key_cont)} and -\tcode{c.values} with \tcode{std::move(mapped_cont)}; -value-initializes \tcode{compare}. +Equivalent to \tcode{flat_multimap(key_cont, mapped_cont)}, +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)}. \end{itemdescr} \indexlibraryctor{flat_multimap}% \begin{itemdecl} template flat_multimap(sorted_equivalent_t s, const key_container_type& key_cont, - const mapped_container_type& mapped_cont, const Allocator& a); + const mapped_container_type& mapped_cont, 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)}, @@ -16199,42 +16196,37 @@ \indexlibraryctor{flat_multimap}% \begin{itemdecl} -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(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 @@ -16390,69 +16382,73 @@ // \ref{flat.set.cons}, constructors flat_set() : flat_set(key_compare()) { } - explicit flat_set(container_type cont); - template - flat_set(const container_type& cont, const Allocator& a); + explicit flat_set(const key_compare& comp) + : @\exposid{c}@(), @\exposid{compare}@(comp) { } + explicit flat_set(container_type cont); flat_set(sorted_unique_t, container_type cont) : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(key_compare()) { } - template - flat_set(sorted_unique_t, const container_type& cont, 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(sorted_unique_t, const container_type& cont, 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 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); + template + flat_set(sorted_unique_t, initializer_list il, const Alloc& a); flat_set& operator=(initializer_list); @@ -16615,17 +16611,19 @@ 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 +If \tcode{uses_allocator_v} is \tcode{false} +the constructors in this subclause shall not participate in overload resolution. + \indexlibraryctor{flat_set}% \begin{itemdecl} -template - flat_set(const container_type& cont, const Allocator& a); +template + flat_set(const container_type& cont, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_set(cont)}, @@ -16639,15 +16637,11 @@ \indexlibraryctor{flat_set}% \begin{itemdecl} -template - flat_set(sorted_unique_t s, const container_type& cont, const Allocator& a); +template + flat_set(sorted_unique_t s, const container_type& cont, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_set(s, cont)}, @@ -16661,39 +16655,35 @@ \indexlibraryctor{flat_set}% \begin{itemdecl} -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(InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a); +template + flat_set(InputIterator first, InputIterator last, 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(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 + 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 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); +template + flat_set(sorted_unique_t, initializer_list il, 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 @@ -16990,72 +16980,75 @@ // \ref{flat.multiset.cons}, constructors flat_multiset() : flat_multiset(key_compare()) { } - explicit flat_multiset(container_type cont); - template - flat_multiset(const container_type& cont, const Allocator& a); + explicit flat_multiset(const key_compare& comp) + : @\exposid{c}@(), @\exposid{compare}@(comp) { } + explicit flat_multiset(container_type cont); flat_multiset(sorted_equivalent_t, container_type cont) : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(key_compare()) { } - template - flat_multiset(sorted_equivalent_t, const container_type&, 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(sorted_equivalent_t, const container_type&, 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 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); + template + flat_multiset(sorted_equivalent_t, initializer_list il, const Alloc& a); flat_multiset& operator=(initializer_list); @@ -17215,17 +17208,19 @@ 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 +If \tcode{uses_allocator_v} is \tcode{false} +the constructors in this subclause shall not participate in overload resolution. + \indexlibraryctor{flat_multiset}% \begin{itemdecl} -template - flat_multiset(const container_type& cont, const Allocator& a); +template + flat_multiset(const container_type& cont, const Alloc& a); \end{itemdecl} \begin{itemdescr} -\pnum -\constraints -\tcode{uses_allocator_v} is \tcode{true}. - \pnum \effects Equivalent to \tcode{flat_multiset(cont)}, @@ -17239,15 +17234,11 @@ \indexlibraryctor{flat_multiset}% \begin{itemdecl} -template - flat_multiset(sorted_equivalent_t s, const container_type& cont, const Allocator& a); +template + flat_multiset(sorted_equivalent_t s, const container_type& cont, 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)}, @@ -17261,40 +17252,36 @@ \indexlibraryctor{flat_multiset}% \begin{itemdecl} -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(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<@\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(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 + flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, 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