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 Jun 16, 2023
1 parent ecb2891 commit 7a32471
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16484,19 +16484,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 @@ -16505,11 +16510,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 @@ -16519,6 +16519,10 @@

// \ref{flat.set.cons.alloc}, constructors with allocators

template<class Alloc>
explicit flat_set(const Alloc& a);
template<class Alloc>
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 @@ -16528,33 +16532,29 @@
template<class Alloc>
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);
template<class Alloc>
explicit 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 @@ -16794,32 +16794,32 @@

\indexlibraryctor{flat_set}%
\begin{itemdecl}
template<class Alloc>
flat_set(const key_compare& comp, const Alloc& a);
template<class Alloc>
explicit flat_set(const Alloc& a);
template<class Alloc>
flat_set(const key_compare& comp, 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 7a32471

Please sign in to comment.