Skip to content

Commit

Permalink
[containers] Removed redundant specifications of non-member swap
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer committed Mar 31, 2018
1 parent 2f58dc8 commit d8c482f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 193 deletions.
206 changes: 13 additions & 193 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@

\tcode{swap(a, b)} &
\tcode{void} &
\tcode{a.swap(b)} &
Equivalent to \tcode{a.swap(b)} &
&
(Note A) \\ \rowsep

Expand Down Expand Up @@ -3513,7 +3513,7 @@
deque(InputIterator, InputIterator, Allocator = Allocator())
-> deque<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;

// \ref{deque.special}, specialized algorithms
// swap
template<class T, class Allocator>
void swap(deque<T, Allocator>& x, deque<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
Expand Down Expand Up @@ -3740,21 +3740,6 @@
\tcode{T}.
\end{itemdescr}

\rSec3[deque.special]{Specialized algorithms}

\indexlibrarymember{swap}{deque}%
\begin{itemdecl}
template<class T, class Allocator>
void swap(deque<T, Allocator>& x, deque<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[forwardlist]{Class template \tcode{forward_list}}

\rSec3[forwardlist.overview]{Overview}
Expand Down Expand Up @@ -3901,7 +3886,7 @@
forward_list(InputIterator, InputIterator, Allocator = Allocator())
-> forward_list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;

// \ref{forwardlist.spec}, specialized algorithms
// swap
template<class T, class Allocator>
void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
Expand Down Expand Up @@ -4435,20 +4420,6 @@
\complexity Linear time.
\end{itemdescr}

\rSec3[forwardlist.spec]{Specialized algorithms}

\indexlibrarymember{swap}{forward_list}%
\begin{itemdecl}
template<class T, class Allocator>
void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[list]{Class template \tcode{list}}

\rSec3[list.overview]{Overview}
Expand Down Expand Up @@ -4607,7 +4578,7 @@
list(InputIterator, InputIterator, Allocator = Allocator())
-> list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;

// \ref{list.special}, specialized algorithms
// swap
template<class T, class Allocator>
void swap(list<T, Allocator>& x, list<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
Expand Down Expand Up @@ -5118,21 +5089,6 @@
\tcode{N == size()}.
\end{itemdescr}

\rSec3[list.special]{Specialized algorithms}

\indexlibrarymember{swap}{list}%
\begin{itemdecl}
template<class T, class Allocator>
void swap(list<T, Allocator>& x, list<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[vector]{Class template \tcode{vector}}

\rSec3[vector.overview]{Overview}
Expand Down Expand Up @@ -5268,7 +5224,7 @@
vector(InputIterator, InputIterator, Allocator = Allocator())
-> vector<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;

// \ref{vector.special}, specialized algorithms
// swap
template<class T, class Allocator>
void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
Expand Down Expand Up @@ -5611,21 +5567,6 @@
\tcode{T}.
\end{itemdescr}

\rSec3[vector.special]{Specialized algorithms}

\indexlibrarymember{swap}{vector}%
\begin{itemdecl}
template<class T, class Allocator>
void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[vector.bool]{Class \tcode{vector<bool>}}

\pnum
Expand Down Expand Up @@ -6212,7 +6153,7 @@
template<class Key, class T, class Allocator>
map(initializer_list<pair<const Key, T>>, Allocator) -> map<Key, T, less<Key>, Allocator>;

// \ref{map.special}, specialized algorithms
// swap
template<class Key, class T, class Compare, class Allocator>
void swap(map<Key, T, Compare, Allocator>& x,
map<Key, T, Compare, Allocator>& y)
Expand Down Expand Up @@ -6485,22 +6426,6 @@
respectively.
\end{itemdescr}

\rSec3[map.special]{Specialized algorithms}

\indexlibrarymember{swap}{map}%
\begin{itemdecl}
template<class Key, class T, class Compare, class Allocator>
void swap(map<Key, T, Compare, Allocator>& x,
map<Key, T, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[multimap]{Class template \tcode{multimap}}

\rSec3[multimap.overview]{Overview}
Expand Down Expand Up @@ -6722,7 +6647,7 @@
multimap(initializer_list<pair<const Key, T>>, Allocator)
-> multimap<Key, T, less<Key>, Allocator>;

// \ref{multimap.special}, specialized algorithms
// swap
template<class Key, class T, class Compare, class Allocator>
void swap(multimap<Key, T, Compare, Allocator>& x,
multimap<Key, T, Compare, Allocator>& y)
Expand Down Expand Up @@ -6800,22 +6725,6 @@
\tcode{true}.
\end{itemdescr}

\rSec3[multimap.special]{Specialized algorithms}

\indexlibrarymember{swap}{multimap}%
\begin{itemdecl}
template<class Key, class T, class Compare, class Allocator>
void swap(multimap<Key, T, Compare, Allocator>& x,
multimap<Key, T, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[set]{Class template \tcode{set}}

\rSec3[set.overview]{Overview}
Expand Down Expand Up @@ -7016,7 +6925,7 @@
template<class Key, class Allocator>
set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>;

// \ref{set.special}, specialized algorithms
// swap
template<class Key, class Compare, class Allocator>
void swap(set<Key, Compare, Allocator>& x,
set<Key, Compare, Allocator>& y)
Expand Down Expand Up @@ -7069,22 +6978,6 @@
\tcode{last - first}.
\end{itemdescr}

\rSec3[set.special]{Specialized algorithms}

\indexlibrarymember{swap}{set}%
\begin{itemdecl}
template<class Key, class Compare, class Allocator>
void swap(set<Key, Compare, Allocator>& x,
set<Key, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[multiset]{Class template \tcode{multiset}}

\rSec3[multiset.overview]{Overview}
Expand Down Expand Up @@ -7283,7 +7176,7 @@
template<class Key, class Allocator>
multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>;

// \ref{multiset.special}, specialized algorithms
// swap
template<class Key, class Compare, class Allocator>
void swap(multiset<Key, Compare, Allocator>& x,
multiset<Key, Compare, Allocator>& y)
Expand Down Expand Up @@ -7336,22 +7229,6 @@
\tcode{last - first}.
\end{itemdescr}

\rSec3[multiset.special]{Specialized algorithms}

\indexlibrarymember{swap}{multiset}%
\begin{itemdecl}
template<class Key, class Compare, class Allocator>
void swap(multiset<Key, Compare, Allocator>& x,
multiset<Key, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec1[unord]{Unordered associative containers}

\rSec2[unord.general]{In general}
Expand Down Expand Up @@ -7748,7 +7625,7 @@
Allocator)
-> unordered_map<Key, T, Hash, equal_to<Key>, Allocator>;

// \ref{unord.map.swap}, swap
// swap
template<class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
unordered_map<Key, T, Hash, Pred, Alloc>& y)
Expand Down Expand Up @@ -8037,20 +7914,6 @@
respectively.
\end{itemdescr}

\rSec3[unord.map.swap]{Swap}

\indexlibrarymember{unordered_map}{swap}%
\begin{itemdecl}
template<class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
unordered_map<Key, T, Hash, Pred, Alloc>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum\effects As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[unord.multimap]{Class template \tcode{unordered_multimap}}%
\indexlibrary{\idxcode{unordered_multimap}}

Expand Down Expand Up @@ -8286,7 +8149,7 @@
Hash, Allocator)
-> unordered_multimap<Key, T, Hash, equal_to<Key>, Allocator>;

// \ref{unord.multimap.swap}, swap
// swap
template<class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
Expand Down Expand Up @@ -8386,21 +8249,6 @@
unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
\end{itemdescr}

\rSec3[unord.multimap.swap]{Swap}

\indexlibrarymember{unordered_multimap}{swap}%
\begin{itemdecl}
template<class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}


\begin{itemdescr}
\pnum\effects As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[unord.set]{Class template \tcode{unordered_set}}%
\indexlibrary{\idxcode{unordered_set}}

Expand Down Expand Up @@ -8615,7 +8463,7 @@
unordered_set(initializer_list<T>, typename @\seebelow@::size_type, Hash, Allocator)
-> unordered_set<T, Hash, equal_to<T>, Allocator>;

// \ref{unord.set.swap}, swap
// swap
template<class Key, class Hash, class Pred, class Alloc>
void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
unordered_set<Key, Hash, Pred, Alloc>& y)
Expand Down Expand Up @@ -8683,20 +8531,6 @@
\complexity Average case linear, worst case quadratic.
\end{itemdescr}

\rSec3[unord.set.swap]{Swap}

\indexlibrarymember{unordered_set}{swap}%
\begin{itemdecl}
template<class Key, class Hash, class Pred, class Alloc>
void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
unordered_set<Key, Hash, Pred, Alloc>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum\effects As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec2[unord.multiset]{Class template \tcode{unordered_multiset}}%
\indexlibrary{\idxcode{unordered_multiset}}

Expand Down Expand Up @@ -8917,7 +8751,7 @@
unordered_multiset(initializer_list<T>, typename @\seebelow@::size_type, Hash, Allocator)
-> unordered_multiset<T, Hash, equal_to<T>, Allocator>;

// \ref{unord.multiset.swap}, swap
// swap
template<class Key, class Hash, class Pred, class Alloc>
void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
unordered_multiset<Key, Hash, Pred, Alloc>& y)
Expand Down Expand Up @@ -8984,20 +8818,6 @@
\pnum\complexity Average case linear, worst case quadratic.
\end{itemdescr}

\rSec3[unord.multiset.swap]{Swap}

\indexlibrarymember{unordered_multiset}{swap}%
\begin{itemdecl}
template<class Key, class Hash, class Pred, class Alloc>
void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
unordered_multiset<Key, Hash, Pred, Alloc>& y)
noexcept(noexcept(x.swap(y)));
\end{itemdecl}

\begin{itemdescr}
\pnum\effects As if by \tcode{x.swap(y)}.
\end{itemdescr}

\rSec1[container.adaptors]{Container adaptors}

\rSec2[container.adaptors.general]{In general}
Expand Down

0 comments on commit d8c482f

Please sign in to comment.