Skip to content

Commit 4f50bc3

Browse files
committed
[flat.multimap] 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 319cfcd commit 4f50bc3

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

source/containers.tex

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16393,34 +16393,34 @@
1639316393
// \ref{flat.multimap.cons}, constructors
1639416394
flat_multimap() : flat_multimap(key_compare()) { }
1639516395

16396+
explicit flat_multimap(const key_compare& comp)
16397+
: c(), compare(comp) { }
16398+
1639616399
flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont,
1639716400
const key_compare& comp = key_compare());
1639816401

1639916402
flat_multimap(sorted_equivalent_t,
1640016403
key_container_type key_cont, mapped_container_type mapped_cont,
1640116404
const key_compare& comp = key_compare());
1640216405

16403-
explicit flat_multimap(const key_compare& comp)
16404-
: c(), compare(comp) { }
16405-
1640616406
template<class InputIterator>
1640716407
flat_multimap(InputIterator first, InputIterator last,
1640816408
const key_compare& comp = key_compare())
1640916409
: c(), compare(comp)
1641016410
{ insert(first, last); }
1641116411

16412+
template<class InputIterator>
16413+
flat_multimap(sorted_equivalent_t s, InputIterator first, InputIterator last,
16414+
const key_compare& comp = key_compare())
16415+
: c(), compare(comp) { insert(s, first, last); }
16416+
1641216417
template<@\exposconcept{container-compatible-range}@<value_type> R>
1641316418
flat_multimap(from_range_t fr, R&& rg)
1641416419
: flat_multimap(fr, std::forward<R>(rg), key_compare()) { }
1641516420
template<@\exposconcept{container-compatible-range}@<value_type> R>
1641616421
flat_multimap(from_range_t, R&& rg, const key_compare& comp)
1641716422
: flat_multimap(comp) { insert_range(std::forward<R>(rg)); }
1641816423

16419-
template<class InputIterator>
16420-
flat_multimap(sorted_equivalent_t s, InputIterator first, InputIterator last,
16421-
const key_compare& comp = key_compare())
16422-
: c(), compare(comp) { insert(s, first, last); }
16423-
1642416424
flat_multimap(initializer_list<value_type> il, const key_compare& comp = key_compare())
1642516425
: flat_multimap(il.begin(), il.end(), comp) { }
1642616426

@@ -16431,9 +16431,9 @@
1643116431
// \ref{flat.multimap.cons.alloc}, constructors with allocators
1643216432

1643316433
template<class Alloc>
16434-
flat_multimap(const flat_multimap&, const Alloc& a);
16434+
explicit flat_multimap(const Alloc& a);
1643516435
template<class Alloc>
16436-
flat_multimap(flat_multimap&&, const Alloc& a);
16436+
flat_multimap(const key_compare& comp, const Alloc& a);
1643716437
template<class Alloc>
1643816438
flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
1643916439
const Alloc& a);
@@ -16448,34 +16448,34 @@
1644816448
const mapped_container_type& mapped_cont,
1644916449
const key_compare& comp, const Alloc& a);
1645016450
template<class Alloc>
16451-
flat_multimap(const key_compare& comp, const Alloc& a);
16451+
flat_multimap(const flat_multimap&, const Alloc& a);
1645216452
template<class Alloc>
16453-
explicit flat_multimap(const Alloc& a);
16453+
flat_multimap(flat_multimap&&, const Alloc& a);
16454+
template<class InputIterator, class Alloc>
16455+
flat_multimap(InputIterator first, InputIterator last, const Alloc& a);
1645416456
template<class InputIterator, class Alloc>
1645516457
flat_multimap(InputIterator first, InputIterator last,
1645616458
const key_compare& comp, const Alloc& a);
1645716459
template<class InputIterator, class Alloc>
16458-
flat_multimap(InputIterator first, InputIterator last, const Alloc& a);
16460+
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16461+
const Alloc& a);
16462+
template<class InputIterator, class Alloc>
16463+
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16464+
const key_compare& comp, const Alloc& a);
1645916465
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1646016466
flat_multimap(from_range_t, R&& rg, const Alloc& a);
1646116467
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1646216468
flat_multimap(from_range_t, R&& rg, const key_compare& comp, const Alloc& a);
16463-
template<class InputIterator, class Alloc>
16464-
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16465-
const key_compare& comp, const Alloc& a);
16466-
template<class InputIterator, class Alloc>
16467-
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16468-
const Alloc& a);
16469+
template<class Alloc>
16470+
flat_multimap(initializer_list<value_type> il, const Alloc& a);
1646916471
template<class Alloc>
1647016472
flat_multimap(initializer_list<value_type> il, const key_compare& comp,
1647116473
const Alloc& a);
1647216474
template<class Alloc>
16473-
flat_multimap(initializer_list<value_type> il, const Alloc& a);
16475+
flat_multimap(sorted_equivalent_t, initializer_list<value_type> il, const Alloc& a);
1647416476
template<class Alloc>
1647516477
flat_multimap(sorted_equivalent_t, initializer_list<value_type> il,
1647616478
const key_compare& comp, const Alloc& a);
16477-
template<class Alloc>
16478-
flat_multimap(sorted_equivalent_t, initializer_list<value_type> il, const Alloc& a);
1647916479

1648016480
flat_multimap& operator=(initializer_list<value_type>);
1648116481

@@ -16768,37 +16768,37 @@
1676816768
\indexlibraryctor{flat_multimap}%
1676916769
\begin{itemdecl}
1677016770
template<class Alloc>
16771-
flat_multimap(const flat_multimap&, const Alloc& a);
16772-
template<class Alloc>
16773-
flat_multimap(flat_multimap&&, const Alloc& a);
16771+
explicit flat_multimap(const Alloc& a);
1677416772
template<class Alloc>
1677516773
flat_multimap(const key_compare& comp, const Alloc& a);
1677616774
template<class Alloc>
16777-
explicit flat_multimap(const Alloc& a);
16775+
flat_multimap(const flat_multimap&, const Alloc& a);
16776+
template<class Alloc>
16777+
flat_multimap(flat_multimap&&, const Alloc& a);
16778+
template<class InputIterator, class Alloc>
16779+
flat_multimap(InputIterator first, InputIterator last, const Alloc& a);
1677816780
template<class InputIterator, class Alloc>
1677916781
flat_multimap(InputIterator first, InputIterator last, const key_compare& comp,
1678016782
const Alloc& a);
1678116783
template<class InputIterator, class Alloc>
16782-
flat_multimap(InputIterator first, InputIterator last, const Alloc& a);
16784+
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16785+
const Alloc& a);
16786+
template<class InputIterator, class Alloc>
16787+
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16788+
const key_compare& comp, const Alloc& a);
1678316789
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1678416790
flat_multimap(from_range_t, R&& rg, const Alloc& a);
1678516791
template<@\exposconcept{container-compatible-range}@<value_type> R, class Alloc>
1678616792
flat_multimap(from_range_t, R&& rg, const key_compare& comp, const Alloc& a);
16787-
template<class InputIterator, class Alloc>
16788-
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16789-
const key_compare& comp, const Alloc& a);
16790-
template<class InputIterator, class Alloc>
16791-
flat_multimap(sorted_equivalent_t, InputIterator first, InputIterator last,
16792-
const Alloc& a);
16793+
template<class Alloc>
16794+
flat_multimap(initializer_list<value_type> il, const Alloc& a);
1679316795
template<class Alloc>
1679416796
flat_multimap(initializer_list<value_type> il, const key_compare& comp, const Alloc& a);
1679516797
template<class Alloc>
16796-
flat_multimap(initializer_list<value_type> il, const Alloc& a);
16798+
flat_multimap(sorted_equivalent_t, initializer_list<value_type> il, const Alloc& a);
1679716799
template<class Alloc>
1679816800
flat_multimap(sorted_equivalent_t, initializer_list<value_type> il,
1679916801
const key_compare& comp, const Alloc& a);
16800-
template<class Alloc>
16801-
flat_multimap(sorted_equivalent_t, initializer_list<value_type> il, const Alloc& a);
1680216802
\end{itemdecl}
1680316803

1680416804
\begin{itemdescr}

0 commit comments

Comments
 (0)