From d8c482fc447235e0d989b999b257eef96f09f672 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 23 Mar 2018 21:27:11 +0100 Subject: [PATCH] [containers] Removed redundant specifications of non-member swap --- source/containers.tex | 206 +++--------------------------------------- source/xrefdelta.tex | 14 +++ 2 files changed, 27 insertions(+), 193 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index cab5f2cddd..7af4af67a4 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -235,7 +235,7 @@ \tcode{swap(a, b)} & \tcode{void} & - \tcode{a.swap(b)} & + Equivalent to \tcode{a.swap(b)} & & (Note A) \\ \rowsep @@ -3513,7 +3513,7 @@ deque(InputIterator, InputIterator, Allocator = Allocator()) -> deque<@\placeholder{iter-value-type}@, Allocator>; - // \ref{deque.special}, specialized algorithms + // swap template void swap(deque& x, deque& y) noexcept(noexcept(x.swap(y))); @@ -3740,21 +3740,6 @@ \tcode{T}. \end{itemdescr} -\rSec3[deque.special]{Specialized algorithms} - -\indexlibrarymember{swap}{deque}% -\begin{itemdecl} -template - void swap(deque& x, deque& 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} @@ -3901,7 +3886,7 @@ forward_list(InputIterator, InputIterator, Allocator = Allocator()) -> forward_list<@\placeholder{iter-value-type}@, Allocator>; - // \ref{forwardlist.spec}, specialized algorithms + // swap template void swap(forward_list& x, forward_list& y) noexcept(noexcept(x.swap(y))); @@ -4435,20 +4420,6 @@ \complexity Linear time. \end{itemdescr} -\rSec3[forwardlist.spec]{Specialized algorithms} - -\indexlibrarymember{swap}{forward_list}% -\begin{itemdecl} -template - void swap(forward_list& x, forward_list& 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} @@ -4607,7 +4578,7 @@ list(InputIterator, InputIterator, Allocator = Allocator()) -> list<@\placeholder{iter-value-type}@, Allocator>; - // \ref{list.special}, specialized algorithms + // swap template void swap(list& x, list& y) noexcept(noexcept(x.swap(y))); @@ -5118,21 +5089,6 @@ \tcode{N == size()}. \end{itemdescr} -\rSec3[list.special]{Specialized algorithms} - -\indexlibrarymember{swap}{list}% -\begin{itemdecl} -template - void swap(list& x, list& 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} @@ -5268,7 +5224,7 @@ vector(InputIterator, InputIterator, Allocator = Allocator()) -> vector<@\placeholder{iter-value-type}@, Allocator>; - // \ref{vector.special}, specialized algorithms + // swap template void swap(vector& x, vector& y) noexcept(noexcept(x.swap(y))); @@ -5611,21 +5567,6 @@ \tcode{T}. \end{itemdescr} -\rSec3[vector.special]{Specialized algorithms} - -\indexlibrarymember{swap}{vector}% -\begin{itemdecl} -template - void swap(vector& x, vector& 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}} \pnum @@ -6212,7 +6153,7 @@ template map(initializer_list>, Allocator) -> map, Allocator>; - // \ref{map.special}, specialized algorithms + // swap template void swap(map& x, map& y) @@ -6485,22 +6426,6 @@ respectively. \end{itemdescr} -\rSec3[map.special]{Specialized algorithms} - -\indexlibrarymember{swap}{map}% -\begin{itemdecl} -template - void swap(map& x, - map& 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} @@ -6722,7 +6647,7 @@ multimap(initializer_list>, Allocator) -> multimap, Allocator>; - // \ref{multimap.special}, specialized algorithms + // swap template void swap(multimap& x, multimap& y) @@ -6800,22 +6725,6 @@ \tcode{true}. \end{itemdescr} -\rSec3[multimap.special]{Specialized algorithms} - -\indexlibrarymember{swap}{multimap}% -\begin{itemdecl} -template - void swap(multimap& x, - multimap& 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} @@ -7016,7 +6925,7 @@ template set(initializer_list, Allocator) -> set, Allocator>; - // \ref{set.special}, specialized algorithms + // swap template void swap(set& x, set& y) @@ -7069,22 +6978,6 @@ \tcode{last - first}. \end{itemdescr} -\rSec3[set.special]{Specialized algorithms} - -\indexlibrarymember{swap}{set}% -\begin{itemdecl} -template - void swap(set& x, - set& 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} @@ -7283,7 +7176,7 @@ template multiset(initializer_list, Allocator) -> multiset, Allocator>; - // \ref{multiset.special}, specialized algorithms + // swap template void swap(multiset& x, multiset& y) @@ -7336,22 +7229,6 @@ \tcode{last - first}. \end{itemdescr} -\rSec3[multiset.special]{Specialized algorithms} - -\indexlibrarymember{swap}{multiset}% -\begin{itemdecl} -template - void swap(multiset& x, - multiset& 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} @@ -7748,7 +7625,7 @@ Allocator) -> unordered_map, Allocator>; - // \ref{unord.map.swap}, swap + // swap template void swap(unordered_map& x, unordered_map& y) @@ -8037,20 +7914,6 @@ respectively. \end{itemdescr} -\rSec3[unord.map.swap]{Swap} - -\indexlibrarymember{unordered_map}{swap}% -\begin{itemdecl} -template - void swap(unordered_map& x, - unordered_map& 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}} @@ -8286,7 +8149,7 @@ Hash, Allocator) -> unordered_multimap, Allocator>; - // \ref{unord.multimap.swap}, swap + // swap template void swap(unordered_multimap& x, unordered_multimap& y) @@ -8386,21 +8249,6 @@ unless \tcode{is_constructible_v} is \tcode{true}. \end{itemdescr} -\rSec3[unord.multimap.swap]{Swap} - -\indexlibrarymember{unordered_multimap}{swap}% -\begin{itemdecl} -template - void swap(unordered_multimap& x, - unordered_multimap& 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}} @@ -8615,7 +8463,7 @@ unordered_set(initializer_list, typename @\seebelow@::size_type, Hash, Allocator) -> unordered_set, Allocator>; - // \ref{unord.set.swap}, swap + // swap template void swap(unordered_set& x, unordered_set& y) @@ -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 - void swap(unordered_set& x, - unordered_set& 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}} @@ -8917,7 +8751,7 @@ unordered_multiset(initializer_list, typename @\seebelow@::size_type, Hash, Allocator) -> unordered_multiset, Allocator>; - // \ref{unord.multiset.swap}, swap + // swap template void swap(unordered_multiset& x, unordered_multiset& y) @@ -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 - void swap(unordered_multiset& x, - unordered_multiset& 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} diff --git a/source/xrefdelta.tex b/source/xrefdelta.tex index bd6a19b713..21e6632bb9 100644 --- a/source/xrefdelta.tex +++ b/source/xrefdelta.tex @@ -76,6 +76,20 @@ \movedxref{insert.iter.op*}{insert.iter.ops} \movedxref{insert.iter.op++}{insert.iter.ops} +% Individual swap sections were removed. +\removedxref{deque.special} +\removedxref{forwardlist.special} +\removedxref{list.special} +\removedxref{vector.special} +\removedxref{map.special} +\removedxref{multimap.special} +\removedxref{set.special} +\removedxref{multiset.special} +\removedxref{unord.map.swap} +\removedxref{unord.multimap.swap} +\removedxref{unord.set.swap} +\removedxref{unord.multiset.swap} + % Deprecated features. %\deprxref{old.label} (if moved to depr.old.label, otherwise use \movedxref)