Skip to content

Commit 8738c6b

Browse files
jensmaurerzygoloid
authored andcommitted
[containers] Removed redundant specifications of non-member swap
1 parent 4d3434c commit 8738c6b

File tree

2 files changed

+27
-193
lines changed

2 files changed

+27
-193
lines changed

source/containers.tex

Lines changed: 13 additions & 193 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235

236236
\tcode{swap(a, b)} &
237237
\tcode{void} &
238-
\tcode{a.swap(b)} &
238+
Equivalent to \tcode{a.swap(b)} &
239239
&
240240
(Note A) \\ \rowsep
241241

@@ -3489,7 +3489,7 @@
34893489
deque(InputIterator, InputIterator, Allocator = Allocator())
34903490
-> deque<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
34913491

3492-
// \ref{deque.special}, specialized algorithms
3492+
// swap
34933493
template<class T, class Allocator>
34943494
void swap(deque<T, Allocator>& x, deque<T, Allocator>& y)
34953495
noexcept(noexcept(x.swap(y)));
@@ -3716,21 +3716,6 @@
37163716
\tcode{T}.
37173717
\end{itemdescr}
37183718

3719-
\rSec3[deque.special]{Specialized algorithms}
3720-
3721-
\indexlibrarymember{swap}{deque}%
3722-
\begin{itemdecl}
3723-
template<class T, class Allocator>
3724-
void swap(deque<T, Allocator>& x, deque<T, Allocator>& y)
3725-
noexcept(noexcept(x.swap(y)));
3726-
\end{itemdecl}
3727-
3728-
\begin{itemdescr}
3729-
\pnum
3730-
\effects
3731-
As if by \tcode{x.swap(y)}.
3732-
\end{itemdescr}
3733-
37343719
\rSec2[forwardlist]{Class template \tcode{forward_list}}
37353720

37363721
\rSec3[forwardlist.overview]{Overview}
@@ -3877,7 +3862,7 @@
38773862
forward_list(InputIterator, InputIterator, Allocator = Allocator())
38783863
-> forward_list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
38793864

3880-
// \ref{forwardlist.spec}, specialized algorithms
3865+
// swap
38813866
template<class T, class Allocator>
38823867
void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)
38833868
noexcept(noexcept(x.swap(y)));
@@ -4411,20 +4396,6 @@
44114396
\complexity Linear time.
44124397
\end{itemdescr}
44134398

4414-
\rSec3[forwardlist.spec]{Specialized algorithms}
4415-
4416-
\indexlibrarymember{swap}{forward_list}%
4417-
\begin{itemdecl}
4418-
template<class T, class Allocator>
4419-
void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)
4420-
noexcept(noexcept(x.swap(y)));
4421-
\end{itemdecl}
4422-
4423-
\begin{itemdescr}
4424-
\pnum
4425-
\effects As if by \tcode{x.swap(y)}.
4426-
\end{itemdescr}
4427-
44284399
\rSec2[list]{Class template \tcode{list}}
44294400

44304401
\rSec3[list.overview]{Overview}
@@ -4583,7 +4554,7 @@
45834554
list(InputIterator, InputIterator, Allocator = Allocator())
45844555
-> list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
45854556

4586-
// \ref{list.special}, specialized algorithms
4557+
// swap
45874558
template<class T, class Allocator>
45884559
void swap(list<T, Allocator>& x, list<T, Allocator>& y)
45894560
noexcept(noexcept(x.swap(y)));
@@ -5094,21 +5065,6 @@
50945065
\tcode{N == size()}.
50955066
\end{itemdescr}
50965067

5097-
\rSec3[list.special]{Specialized algorithms}
5098-
5099-
\indexlibrarymember{swap}{list}%
5100-
\begin{itemdecl}
5101-
template<class T, class Allocator>
5102-
void swap(list<T, Allocator>& x, list<T, Allocator>& y)
5103-
noexcept(noexcept(x.swap(y)));
5104-
\end{itemdecl}
5105-
5106-
\begin{itemdescr}
5107-
\pnum
5108-
\effects
5109-
As if by \tcode{x.swap(y)}.
5110-
\end{itemdescr}
5111-
51125068
\rSec2[vector]{Class template \tcode{vector}}
51135069

51145070
\rSec3[vector.overview]{Overview}
@@ -5244,7 +5200,7 @@
52445200
vector(InputIterator, InputIterator, Allocator = Allocator())
52455201
-> vector<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
52465202

5247-
// \ref{vector.special}, specialized algorithms
5203+
// swap
52485204
template<class T, class Allocator>
52495205
void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
52505206
noexcept(noexcept(x.swap(y)));
@@ -5587,21 +5543,6 @@
55875543
\tcode{T}.
55885544
\end{itemdescr}
55895545

5590-
\rSec3[vector.special]{Specialized algorithms}
5591-
5592-
\indexlibrarymember{swap}{vector}%
5593-
\begin{itemdecl}
5594-
template<class T, class Allocator>
5595-
void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
5596-
noexcept(noexcept(x.swap(y)));
5597-
\end{itemdecl}
5598-
5599-
\begin{itemdescr}
5600-
\pnum
5601-
\effects
5602-
As if by \tcode{x.swap(y)}.
5603-
\end{itemdescr}
5604-
56055546
\rSec2[vector.bool]{Class \tcode{vector<bool>}}
56065547

56075548
\pnum
@@ -6188,7 +6129,7 @@
61886129
template<class Key, class T, class Allocator>
61896130
map(initializer_list<pair<const Key, T>>, Allocator) -> map<Key, T, less<Key>, Allocator>;
61906131

6191-
// \ref{map.special}, specialized algorithms
6132+
// swap
61926133
template<class Key, class T, class Compare, class Allocator>
61936134
void swap(map<Key, T, Compare, Allocator>& x,
61946135
map<Key, T, Compare, Allocator>& y)
@@ -6461,22 +6402,6 @@
64616402
respectively.
64626403
\end{itemdescr}
64636404

6464-
\rSec3[map.special]{Specialized algorithms}
6465-
6466-
\indexlibrarymember{swap}{map}%
6467-
\begin{itemdecl}
6468-
template<class Key, class T, class Compare, class Allocator>
6469-
void swap(map<Key, T, Compare, Allocator>& x,
6470-
map<Key, T, Compare, Allocator>& y)
6471-
noexcept(noexcept(x.swap(y)));
6472-
\end{itemdecl}
6473-
6474-
\begin{itemdescr}
6475-
\pnum
6476-
\effects
6477-
As if by \tcode{x.swap(y)}.
6478-
\end{itemdescr}
6479-
64806405
\rSec2[multimap]{Class template \tcode{multimap}}
64816406

64826407
\rSec3[multimap.overview]{Overview}
@@ -6698,7 +6623,7 @@
66986623
multimap(initializer_list<pair<const Key, T>>, Allocator)
66996624
-> multimap<Key, T, less<Key>, Allocator>;
67006625

6701-
// \ref{multimap.special}, specialized algorithms
6626+
// swap
67026627
template<class Key, class T, class Compare, class Allocator>
67036628
void swap(multimap<Key, T, Compare, Allocator>& x,
67046629
multimap<Key, T, Compare, Allocator>& y)
@@ -6776,22 +6701,6 @@
67766701
\tcode{true}.
67776702
\end{itemdescr}
67786703

6779-
\rSec3[multimap.special]{Specialized algorithms}
6780-
6781-
\indexlibrarymember{swap}{multimap}%
6782-
\begin{itemdecl}
6783-
template<class Key, class T, class Compare, class Allocator>
6784-
void swap(multimap<Key, T, Compare, Allocator>& x,
6785-
multimap<Key, T, Compare, Allocator>& y)
6786-
noexcept(noexcept(x.swap(y)));
6787-
\end{itemdecl}
6788-
6789-
\begin{itemdescr}
6790-
\pnum
6791-
\effects
6792-
As if by \tcode{x.swap(y)}.
6793-
\end{itemdescr}
6794-
67956704
\rSec2[set]{Class template \tcode{set}}
67966705

67976706
\rSec3[set.overview]{Overview}
@@ -6992,7 +6901,7 @@
69926901
template<class Key, class Allocator>
69936902
set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>;
69946903

6995-
// \ref{set.special}, specialized algorithms
6904+
// swap
69966905
template<class Key, class Compare, class Allocator>
69976906
void swap(set<Key, Compare, Allocator>& x,
69986907
set<Key, Compare, Allocator>& y)
@@ -7045,22 +6954,6 @@
70456954
\tcode{last - first}.
70466955
\end{itemdescr}
70476956

7048-
\rSec3[set.special]{Specialized algorithms}
7049-
7050-
\indexlibrarymember{swap}{set}%
7051-
\begin{itemdecl}
7052-
template<class Key, class Compare, class Allocator>
7053-
void swap(set<Key, Compare, Allocator>& x,
7054-
set<Key, Compare, Allocator>& y)
7055-
noexcept(noexcept(x.swap(y)));
7056-
\end{itemdecl}
7057-
7058-
\begin{itemdescr}
7059-
\pnum
7060-
\effects
7061-
As if by \tcode{x.swap(y)}.
7062-
\end{itemdescr}
7063-
70646957
\rSec2[multiset]{Class template \tcode{multiset}}
70656958

70666959
\rSec3[multiset.overview]{Overview}
@@ -7259,7 +7152,7 @@
72597152
template<class Key, class Allocator>
72607153
multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>;
72617154

7262-
// \ref{multiset.special}, specialized algorithms
7155+
// swap
72637156
template<class Key, class Compare, class Allocator>
72647157
void swap(multiset<Key, Compare, Allocator>& x,
72657158
multiset<Key, Compare, Allocator>& y)
@@ -7312,22 +7205,6 @@
73127205
\tcode{last - first}.
73137206
\end{itemdescr}
73147207

7315-
\rSec3[multiset.special]{Specialized algorithms}
7316-
7317-
\indexlibrarymember{swap}{multiset}%
7318-
\begin{itemdecl}
7319-
template<class Key, class Compare, class Allocator>
7320-
void swap(multiset<Key, Compare, Allocator>& x,
7321-
multiset<Key, Compare, Allocator>& y)
7322-
noexcept(noexcept(x.swap(y)));
7323-
\end{itemdecl}
7324-
7325-
\begin{itemdescr}
7326-
\pnum
7327-
\effects
7328-
As if by \tcode{x.swap(y)}.
7329-
\end{itemdescr}
7330-
73317208
\rSec1[unord]{Unordered associative containers}
73327209

73337210
\rSec2[unord.general]{In general}
@@ -7724,7 +7601,7 @@
77247601
Allocator)
77257602
-> unordered_map<Key, T, Hash, equal_to<Key>, Allocator>;
77267603

7727-
// \ref{unord.map.swap}, swap
7604+
// swap
77287605
template<class Key, class T, class Hash, class Pred, class Alloc>
77297606
void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
77307607
unordered_map<Key, T, Hash, Pred, Alloc>& y)
@@ -8013,20 +7890,6 @@
80137890
respectively.
80147891
\end{itemdescr}
80157892

8016-
\rSec3[unord.map.swap]{Swap}
8017-
8018-
\indexlibrarymember{unordered_map}{swap}%
8019-
\begin{itemdecl}
8020-
template<class Key, class T, class Hash, class Pred, class Alloc>
8021-
void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
8022-
unordered_map<Key, T, Hash, Pred, Alloc>& y)
8023-
noexcept(noexcept(x.swap(y)));
8024-
\end{itemdecl}
8025-
8026-
\begin{itemdescr}
8027-
\pnum\effects As if by \tcode{x.swap(y)}.
8028-
\end{itemdescr}
8029-
80307893
\rSec2[unord.multimap]{Class template \tcode{unordered_multimap}}%
80317894
\indexlibrary{\idxcode{unordered_multimap}}
80327895

@@ -8262,7 +8125,7 @@
82628125
Hash, Allocator)
82638126
-> unordered_multimap<Key, T, Hash, equal_to<Key>, Allocator>;
82648127

8265-
// \ref{unord.multimap.swap}, swap
8128+
// swap
82668129
template<class Key, class T, class Hash, class Pred, class Alloc>
82678130
void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
82688131
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
@@ -8362,21 +8225,6 @@
83628225
unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
83638226
\end{itemdescr}
83648227

8365-
\rSec3[unord.multimap.swap]{Swap}
8366-
8367-
\indexlibrarymember{unordered_multimap}{swap}%
8368-
\begin{itemdecl}
8369-
template<class Key, class T, class Hash, class Pred, class Alloc>
8370-
void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
8371-
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
8372-
noexcept(noexcept(x.swap(y)));
8373-
\end{itemdecl}
8374-
8375-
8376-
\begin{itemdescr}
8377-
\pnum\effects As if by \tcode{x.swap(y)}.
8378-
\end{itemdescr}
8379-
83808228
\rSec2[unord.set]{Class template \tcode{unordered_set}}%
83818229
\indexlibrary{\idxcode{unordered_set}}
83828230

@@ -8591,7 +8439,7 @@
85918439
unordered_set(initializer_list<T>, typename @\seebelow@::size_type, Hash, Allocator)
85928440
-> unordered_set<T, Hash, equal_to<T>, Allocator>;
85938441

8594-
// \ref{unord.set.swap}, swap
8442+
// swap
85958443
template<class Key, class Hash, class Pred, class Alloc>
85968444
void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
85978445
unordered_set<Key, Hash, Pred, Alloc>& y)
@@ -8659,20 +8507,6 @@
86598507
\complexity Average case linear, worst case quadratic.
86608508
\end{itemdescr}
86618509

8662-
\rSec3[unord.set.swap]{Swap}
8663-
8664-
\indexlibrarymember{unordered_set}{swap}%
8665-
\begin{itemdecl}
8666-
template<class Key, class Hash, class Pred, class Alloc>
8667-
void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
8668-
unordered_set<Key, Hash, Pred, Alloc>& y)
8669-
noexcept(noexcept(x.swap(y)));
8670-
\end{itemdecl}
8671-
8672-
\begin{itemdescr}
8673-
\pnum\effects As if by \tcode{x.swap(y)}.
8674-
\end{itemdescr}
8675-
86768510
\rSec2[unord.multiset]{Class template \tcode{unordered_multiset}}%
86778511
\indexlibrary{\idxcode{unordered_multiset}}
86788512

@@ -8893,7 +8727,7 @@
88938727
unordered_multiset(initializer_list<T>, typename @\seebelow@::size_type, Hash, Allocator)
88948728
-> unordered_multiset<T, Hash, equal_to<T>, Allocator>;
88958729

8896-
// \ref{unord.multiset.swap}, swap
8730+
// swap
88978731
template<class Key, class Hash, class Pred, class Alloc>
88988732
void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
88998733
unordered_multiset<Key, Hash, Pred, Alloc>& y)
@@ -8960,20 +8794,6 @@
89608794
\pnum\complexity Average case linear, worst case quadratic.
89618795
\end{itemdescr}
89628796

8963-
\rSec3[unord.multiset.swap]{Swap}
8964-
8965-
\indexlibrarymember{unordered_multiset}{swap}%
8966-
\begin{itemdecl}
8967-
template<class Key, class Hash, class Pred, class Alloc>
8968-
void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
8969-
unordered_multiset<Key, Hash, Pred, Alloc>& y)
8970-
noexcept(noexcept(x.swap(y)));
8971-
\end{itemdecl}
8972-
8973-
\begin{itemdescr}
8974-
\pnum\effects As if by \tcode{x.swap(y)}.
8975-
\end{itemdescr}
8976-
89778797
\rSec1[container.adaptors]{Container adaptors}
89788798

89798799
\rSec2[container.adaptors.general]{In general}

0 commit comments

Comments
 (0)