Skip to content

Commit

Permalink
[flat.set] P2767R0 section 3 swaps requested by jwakely in LWG
Browse files Browse the repository at this point in the history
Swap the default ctor to the top.
Follow each non-`key_compare` overload by its `key_compare` counterpart.
Then, follow each non-`sorted_unique` pair of overloads by its `sorted_unique` counterparts.
  • Loading branch information
Quuxplusone committed May 19, 2024
1 parent 347408e commit bdddd87
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16957,19 +16957,24 @@
// \ref{flat.set.cons}, constructors
flat_set() : flat_set(key_compare()) { }

explicit flat_set(const key_compare& comp)
: @\exposid{c}@(), @\exposid{compare}@(comp) { }

explicit flat_set(container_type cont, const key_compare& comp = key_compare());

flat_set(sorted_unique_t, container_type cont, const key_compare& comp = key_compare())
: @\exposid{c}@(std::move(cont)), @\exposid{compare}@(comp) { }

explicit flat_set(const key_compare& comp)
: @\exposid{c}@(), @\exposid{compare}@(comp) { }

template<class InputIterator>
flat_set(InputIterator first, InputIterator last, const key_compare& comp = key_compare())
: @\exposid{c}@(), @\exposid{compare}@(comp)
{ insert(first, last); }

template<class InputIterator>
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}@<value_type> R>
flat_set(from_range_t fr, R&& rg)
: flat_set(fr, std::forward<R>(rg), key_compare()) { }
Expand All @@ -16978,11 +16983,6 @@
: flat_set(comp)
{ insert_range(std::forward<R>(rg)); }

template<class InputIterator>
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
const key_compare& comp = key_compare())
: @\exposid{c}@(first, last), @\exposid{compare}@(comp) { }

flat_set(initializer_list<value_type> il, const key_compare& comp = key_compare())
: flat_set(il.begin(), il.end(), comp) { }

Expand All @@ -16993,9 +16993,9 @@
// \ref{flat.set.cons.alloc}, constructors with allocators

template<class Alloc>
flat_set(const flat_set&, const Alloc& a);
explicit flat_set(const Alloc& a);
template<class Alloc>
flat_set(flat_set&&, const Alloc& a);
flat_set(const key_compare& comp, const Alloc& a);
template<class Alloc>
flat_set(const container_type& cont, const Alloc& a);
template<class Alloc>
Expand All @@ -17006,32 +17006,32 @@
flat_set(sorted_unique_t, const container_type& cont,
const key_compare& comp, const Alloc& a);
template<class Alloc>
flat_set(const key_compare& comp, const Alloc& a);
flat_set(const flat_set&, const Alloc& a);
template<class Alloc>
explicit flat_set(const Alloc& a);
flat_set(flat_set&&, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(InputIterator first, InputIterator last, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(InputIterator first, InputIterator last,
const key_compare& comp, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(InputIterator first, InputIterator last, const Alloc& a);
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
const key_compare& comp, const Alloc& a);
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
flat_set(from_range_t, R&& rg, const Alloc& a);
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
const key_compare& comp, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
template<class Alloc>
flat_set(initializer_list<value_type> il, const Alloc& a);
template<class Alloc>
flat_set(initializer_list<value_type> il, const key_compare& comp, const Alloc& a);
template<class Alloc>
flat_set(initializer_list<value_type> il, const Alloc& a);
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
template<class Alloc>
flat_set(sorted_unique_t, initializer_list<value_type> il,
const key_compare& comp, const Alloc& a);
template<class Alloc>
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);

flat_set& operator=(initializer_list<value_type>);

Expand Down Expand Up @@ -17272,35 +17272,35 @@
\indexlibraryctor{flat_set}%
\begin{itemdecl}
template<class Alloc>
flat_set(const flat_set&, const Alloc& a);
template<class Alloc>
flat_set(flat_set&&, const Alloc& a);
explicit flat_set(const Alloc& a);
template<class Alloc>
flat_set(const key_compare& comp, const Alloc& a);
template<class Alloc>
explicit flat_set(const Alloc& a);
flat_set(const flat_set&, const Alloc& a);
template<class Alloc>
flat_set(flat_set&&, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(InputIterator first, InputIterator last, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(InputIterator first, InputIterator last, const Alloc& a);
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
const key_compare& comp, const Alloc& a);
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
flat_set(from_range_t, R&& rg, const Alloc& a);
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
const key_compare& comp, const Alloc& a);
template<class InputIterator, class Alloc>
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
template<class Alloc>
flat_set(initializer_list<value_type> il, const Alloc& a);
template<class Alloc>
flat_set(initializer_list<value_type> il, const key_compare& comp, const Alloc& a);
template<class Alloc>
flat_set(initializer_list<value_type> il, const Alloc& a);
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
template<class Alloc>
flat_set(sorted_unique_t, initializer_list<value_type> il,
const key_compare& comp, const Alloc& a);
template<class Alloc>
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
\end{itemdecl}

\begin{itemdescr}
Expand Down

0 comments on commit bdddd87

Please sign in to comment.