Skip to content

Commit bdddd87

Browse files
committed
[flat.set] P2767R0 section 3 swaps requested by jwakely in LWG
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.
1 parent 347408e commit bdddd87

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

source/containers.tex

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16957,19 +16957,24 @@
1695716957
// \ref{flat.set.cons}, constructors
1695816958
flat_set() : flat_set(key_compare()) { }
1695916959

16960+
explicit flat_set(const key_compare& comp)
16961+
: @\exposid{c}@(), @\exposid{compare}@(comp) { }
16962+
1696016963
explicit flat_set(container_type cont, const key_compare& comp = key_compare());
1696116964

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

16965-
explicit flat_set(const key_compare& comp)
16966-
: @\exposid{c}@(), @\exposid{compare}@(comp) { }
16967-
1696816968
template<class InputIterator>
1696916969
flat_set(InputIterator first, InputIterator last, const key_compare& comp = key_compare())
1697016970
: @\exposid{c}@(), @\exposid{compare}@(comp)
1697116971
{ insert(first, last); }
1697216972

16973+
template<class InputIterator>
16974+
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
16975+
const key_compare& comp = key_compare())
16976+
: @\exposid{c}@(first, last), @\exposid{compare}@(comp) { }
16977+
1697316978
template<@\exposconcept{container-compatible-range}@<value_type> R>
1697416979
flat_set(from_range_t fr, R&& rg)
1697516980
: flat_set(fr, std::forward<R>(rg), key_compare()) { }
@@ -16978,11 +16983,6 @@
1697816983
: flat_set(comp)
1697916984
{ insert_range(std::forward<R>(rg)); }
1698016985

16981-
template<class InputIterator>
16982-
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
16983-
const key_compare& comp = key_compare())
16984-
: @\exposid{c}@(first, last), @\exposid{compare}@(comp) { }
16985-
1698616986
flat_set(initializer_list<value_type> il, const key_compare& comp = key_compare())
1698716987
: flat_set(il.begin(), il.end(), comp) { }
1698816988

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

1699516995
template<class Alloc>
16996-
flat_set(const flat_set&, const Alloc& a);
16996+
explicit flat_set(const Alloc& a);
1699716997
template<class Alloc>
16998-
flat_set(flat_set&&, const Alloc& a);
16998+
flat_set(const key_compare& comp, const Alloc& a);
1699916999
template<class Alloc>
1700017000
flat_set(const container_type& cont, const Alloc& a);
1700117001
template<class Alloc>
@@ -17006,32 +17006,32 @@
1700617006
flat_set(sorted_unique_t, const container_type& cont,
1700717007
const key_compare& comp, const Alloc& a);
1700817008
template<class Alloc>
17009-
flat_set(const key_compare& comp, const Alloc& a);
17009+
flat_set(const flat_set&, const Alloc& a);
1701017010
template<class Alloc>
17011-
explicit flat_set(const Alloc& a);
17011+
flat_set(flat_set&&, const Alloc& a);
17012+
template<class InputIterator, class Alloc>
17013+
flat_set(InputIterator first, InputIterator last, const Alloc& a);
1701217014
template<class InputIterator, class Alloc>
1701317015
flat_set(InputIterator first, InputIterator last,
1701417016
const key_compare& comp, const Alloc& a);
1701517017
template<class InputIterator, class Alloc>
17016-
flat_set(InputIterator first, InputIterator last, const Alloc& a);
17018+
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
17019+
template<class InputIterator, class Alloc>
17020+
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
17021+
const key_compare& comp, const Alloc& a);
1701717022
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1701817023
flat_set(from_range_t, R&& rg, const Alloc& a);
1701917024
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1702017025
flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a);
17021-
template<class InputIterator, class Alloc>
17022-
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
17023-
const key_compare& comp, const Alloc& a);
17024-
template<class InputIterator, class Alloc>
17025-
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
17026+
template<class Alloc>
17027+
flat_set(initializer_list<value_type> il, const Alloc& a);
1702617028
template<class Alloc>
1702717029
flat_set(initializer_list<value_type> il, const key_compare& comp, const Alloc& a);
1702817030
template<class Alloc>
17029-
flat_set(initializer_list<value_type> il, const Alloc& a);
17031+
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
1703017032
template<class Alloc>
1703117033
flat_set(sorted_unique_t, initializer_list<value_type> il,
1703217034
const key_compare& comp, const Alloc& a);
17033-
template<class Alloc>
17034-
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
1703517035

1703617036
flat_set& operator=(initializer_list<value_type>);
1703717037

@@ -17272,35 +17272,35 @@
1727217272
\indexlibraryctor{flat_set}%
1727317273
\begin{itemdecl}
1727417274
template<class Alloc>
17275-
flat_set(const flat_set&, const Alloc& a);
17276-
template<class Alloc>
17277-
flat_set(flat_set&&, const Alloc& a);
17275+
explicit flat_set(const Alloc& a);
1727817276
template<class Alloc>
1727917277
flat_set(const key_compare& comp, const Alloc& a);
1728017278
template<class Alloc>
17281-
explicit flat_set(const Alloc& a);
17279+
flat_set(const flat_set&, const Alloc& a);
17280+
template<class Alloc>
17281+
flat_set(flat_set&&, const Alloc& a);
17282+
template<class InputIterator, class Alloc>
17283+
flat_set(InputIterator first, InputIterator last, const Alloc& a);
1728217284
template<class InputIterator, class Alloc>
1728317285
flat_set(InputIterator first, InputIterator last, const key_compare& comp, const Alloc& a);
1728417286
template<class InputIterator, class Alloc>
17285-
flat_set(InputIterator first, InputIterator last, const Alloc& a);
17287+
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
17288+
template<class InputIterator, class Alloc>
17289+
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
17290+
const key_compare& comp, const Alloc& a);
1728617291
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1728717292
flat_set(from_range_t, R&& rg, const Alloc& a);
1728817293
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1728917294
flat_set(from_range_t, R&& rg, const key_compare& comp, const Alloc& a);
17290-
template<class InputIterator, class Alloc>
17291-
flat_set(sorted_unique_t, InputIterator first, InputIterator last,
17292-
const key_compare& comp, const Alloc& a);
17293-
template<class InputIterator, class Alloc>
17294-
flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Alloc& a);
17295+
template<class Alloc>
17296+
flat_set(initializer_list<value_type> il, const Alloc& a);
1729517297
template<class Alloc>
1729617298
flat_set(initializer_list<value_type> il, const key_compare& comp, const Alloc& a);
1729717299
template<class Alloc>
17298-
flat_set(initializer_list<value_type> il, const Alloc& a);
17300+
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
1729917301
template<class Alloc>
1730017302
flat_set(sorted_unique_t, initializer_list<value_type> il,
1730117303
const key_compare& comp, const Alloc& a);
17302-
template<class Alloc>
17303-
flat_set(sorted_unique_t, initializer_list<value_type> il, const Alloc& a);
1730417304
\end{itemdecl}
1730517305

1730617306
\begin{itemdescr}

0 commit comments

Comments
 (0)