|
235 | 235 |
|
236 | 236 | \tcode{swap(a, b)} &
|
237 | 237 | \tcode{void} &
|
238 |
| - \tcode{a.swap(b)} & |
| 238 | + Equivalent to \tcode{a.swap(b)} & |
239 | 239 | &
|
240 | 240 | (Note A) \\ \rowsep
|
241 | 241 |
|
|
3489 | 3489 | deque(InputIterator, InputIterator, Allocator = Allocator())
|
3490 | 3490 | -> deque<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
|
3491 | 3491 |
|
3492 |
| - // \ref{deque.special}, specialized algorithms |
| 3492 | + // swap |
3493 | 3493 | template<class T, class Allocator>
|
3494 | 3494 | void swap(deque<T, Allocator>& x, deque<T, Allocator>& y)
|
3495 | 3495 | noexcept(noexcept(x.swap(y)));
|
|
3716 | 3716 | \tcode{T}.
|
3717 | 3717 | \end{itemdescr}
|
3718 | 3718 |
|
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 |
| - |
3734 | 3719 | \rSec2[forwardlist]{Class template \tcode{forward_list}}
|
3735 | 3720 |
|
3736 | 3721 | \rSec3[forwardlist.overview]{Overview}
|
|
3877 | 3862 | forward_list(InputIterator, InputIterator, Allocator = Allocator())
|
3878 | 3863 | -> forward_list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
|
3879 | 3864 |
|
3880 |
| - // \ref{forwardlist.spec}, specialized algorithms |
| 3865 | + // swap |
3881 | 3866 | template<class T, class Allocator>
|
3882 | 3867 | void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)
|
3883 | 3868 | noexcept(noexcept(x.swap(y)));
|
|
4411 | 4396 | \complexity Linear time.
|
4412 | 4397 | \end{itemdescr}
|
4413 | 4398 |
|
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 |
| - |
4428 | 4399 | \rSec2[list]{Class template \tcode{list}}
|
4429 | 4400 |
|
4430 | 4401 | \rSec3[list.overview]{Overview}
|
|
4583 | 4554 | list(InputIterator, InputIterator, Allocator = Allocator())
|
4584 | 4555 | -> list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
|
4585 | 4556 |
|
4586 |
| - // \ref{list.special}, specialized algorithms |
| 4557 | + // swap |
4587 | 4558 | template<class T, class Allocator>
|
4588 | 4559 | void swap(list<T, Allocator>& x, list<T, Allocator>& y)
|
4589 | 4560 | noexcept(noexcept(x.swap(y)));
|
|
5094 | 5065 | \tcode{N == size()}.
|
5095 | 5066 | \end{itemdescr}
|
5096 | 5067 |
|
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 |
| - |
5112 | 5068 | \rSec2[vector]{Class template \tcode{vector}}
|
5113 | 5069 |
|
5114 | 5070 | \rSec3[vector.overview]{Overview}
|
|
5244 | 5200 | vector(InputIterator, InputIterator, Allocator = Allocator())
|
5245 | 5201 | -> vector<@\placeholder{iter-value-type}@<InputIterator>, Allocator>;
|
5246 | 5202 |
|
5247 |
| - // \ref{vector.special}, specialized algorithms |
| 5203 | + // swap |
5248 | 5204 | template<class T, class Allocator>
|
5249 | 5205 | void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
|
5250 | 5206 | noexcept(noexcept(x.swap(y)));
|
|
5587 | 5543 | \tcode{T}.
|
5588 | 5544 | \end{itemdescr}
|
5589 | 5545 |
|
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 |
| - |
5605 | 5546 | \rSec2[vector.bool]{Class \tcode{vector<bool>}}
|
5606 | 5547 |
|
5607 | 5548 | \pnum
|
|
6188 | 6129 | template<class Key, class T, class Allocator>
|
6189 | 6130 | map(initializer_list<pair<const Key, T>>, Allocator) -> map<Key, T, less<Key>, Allocator>;
|
6190 | 6131 |
|
6191 |
| - // \ref{map.special}, specialized algorithms |
| 6132 | + // swap |
6192 | 6133 | template<class Key, class T, class Compare, class Allocator>
|
6193 | 6134 | void swap(map<Key, T, Compare, Allocator>& x,
|
6194 | 6135 | map<Key, T, Compare, Allocator>& y)
|
|
6461 | 6402 | respectively.
|
6462 | 6403 | \end{itemdescr}
|
6463 | 6404 |
|
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 |
| - |
6480 | 6405 | \rSec2[multimap]{Class template \tcode{multimap}}
|
6481 | 6406 |
|
6482 | 6407 | \rSec3[multimap.overview]{Overview}
|
|
6698 | 6623 | multimap(initializer_list<pair<const Key, T>>, Allocator)
|
6699 | 6624 | -> multimap<Key, T, less<Key>, Allocator>;
|
6700 | 6625 |
|
6701 |
| - // \ref{multimap.special}, specialized algorithms |
| 6626 | + // swap |
6702 | 6627 | template<class Key, class T, class Compare, class Allocator>
|
6703 | 6628 | void swap(multimap<Key, T, Compare, Allocator>& x,
|
6704 | 6629 | multimap<Key, T, Compare, Allocator>& y)
|
|
6776 | 6701 | \tcode{true}.
|
6777 | 6702 | \end{itemdescr}
|
6778 | 6703 |
|
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 |
| - |
6795 | 6704 | \rSec2[set]{Class template \tcode{set}}
|
6796 | 6705 |
|
6797 | 6706 | \rSec3[set.overview]{Overview}
|
|
6992 | 6901 | template<class Key, class Allocator>
|
6993 | 6902 | set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>;
|
6994 | 6903 |
|
6995 |
| - // \ref{set.special}, specialized algorithms |
| 6904 | + // swap |
6996 | 6905 | template<class Key, class Compare, class Allocator>
|
6997 | 6906 | void swap(set<Key, Compare, Allocator>& x,
|
6998 | 6907 | set<Key, Compare, Allocator>& y)
|
|
7045 | 6954 | \tcode{last - first}.
|
7046 | 6955 | \end{itemdescr}
|
7047 | 6956 |
|
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 |
| - |
7064 | 6957 | \rSec2[multiset]{Class template \tcode{multiset}}
|
7065 | 6958 |
|
7066 | 6959 | \rSec3[multiset.overview]{Overview}
|
|
7259 | 7152 | template<class Key, class Allocator>
|
7260 | 7153 | multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>;
|
7261 | 7154 |
|
7262 |
| - // \ref{multiset.special}, specialized algorithms |
| 7155 | + // swap |
7263 | 7156 | template<class Key, class Compare, class Allocator>
|
7264 | 7157 | void swap(multiset<Key, Compare, Allocator>& x,
|
7265 | 7158 | multiset<Key, Compare, Allocator>& y)
|
|
7312 | 7205 | \tcode{last - first}.
|
7313 | 7206 | \end{itemdescr}
|
7314 | 7207 |
|
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 |
| - |
7331 | 7208 | \rSec1[unord]{Unordered associative containers}
|
7332 | 7209 |
|
7333 | 7210 | \rSec2[unord.general]{In general}
|
|
7724 | 7601 | Allocator)
|
7725 | 7602 | -> unordered_map<Key, T, Hash, equal_to<Key>, Allocator>;
|
7726 | 7603 |
|
7727 |
| - // \ref{unord.map.swap}, swap |
| 7604 | + // swap |
7728 | 7605 | template<class Key, class T, class Hash, class Pred, class Alloc>
|
7729 | 7606 | void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
7730 | 7607 | unordered_map<Key, T, Hash, Pred, Alloc>& y)
|
|
8013 | 7890 | respectively.
|
8014 | 7891 | \end{itemdescr}
|
8015 | 7892 |
|
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 |
| - |
8030 | 7893 | \rSec2[unord.multimap]{Class template \tcode{unordered_multimap}}%
|
8031 | 7894 | \indexlibrary{\idxcode{unordered_multimap}}
|
8032 | 7895 |
|
|
8262 | 8125 | Hash, Allocator)
|
8263 | 8126 | -> unordered_multimap<Key, T, Hash, equal_to<Key>, Allocator>;
|
8264 | 8127 |
|
8265 |
| - // \ref{unord.multimap.swap}, swap |
| 8128 | + // swap |
8266 | 8129 | template<class Key, class T, class Hash, class Pred, class Alloc>
|
8267 | 8130 | void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
8268 | 8131 | unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
|
|
8362 | 8225 | unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
|
8363 | 8226 | \end{itemdescr}
|
8364 | 8227 |
|
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 |
| - |
8380 | 8228 | \rSec2[unord.set]{Class template \tcode{unordered_set}}%
|
8381 | 8229 | \indexlibrary{\idxcode{unordered_set}}
|
8382 | 8230 |
|
|
8591 | 8439 | unordered_set(initializer_list<T>, typename @\seebelow@::size_type, Hash, Allocator)
|
8592 | 8440 | -> unordered_set<T, Hash, equal_to<T>, Allocator>;
|
8593 | 8441 |
|
8594 |
| - // \ref{unord.set.swap}, swap |
| 8442 | + // swap |
8595 | 8443 | template<class Key, class Hash, class Pred, class Alloc>
|
8596 | 8444 | void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
|
8597 | 8445 | unordered_set<Key, Hash, Pred, Alloc>& y)
|
|
8659 | 8507 | \complexity Average case linear, worst case quadratic.
|
8660 | 8508 | \end{itemdescr}
|
8661 | 8509 |
|
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 |
| - |
8676 | 8510 | \rSec2[unord.multiset]{Class template \tcode{unordered_multiset}}%
|
8677 | 8511 | \indexlibrary{\idxcode{unordered_multiset}}
|
8678 | 8512 |
|
|
8893 | 8727 | unordered_multiset(initializer_list<T>, typename @\seebelow@::size_type, Hash, Allocator)
|
8894 | 8728 | -> unordered_multiset<T, Hash, equal_to<T>, Allocator>;
|
8895 | 8729 |
|
8896 |
| - // \ref{unord.multiset.swap}, swap |
| 8730 | + // swap |
8897 | 8731 | template<class Key, class Hash, class Pred, class Alloc>
|
8898 | 8732 | void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
8899 | 8733 | unordered_multiset<Key, Hash, Pred, Alloc>& y)
|
|
8960 | 8794 | \pnum\complexity Average case linear, worst case quadratic.
|
8961 | 8795 | \end{itemdescr}
|
8962 | 8796 |
|
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 |
| - |
8977 | 8797 | \rSec1[container.adaptors]{Container adaptors}
|
8978 | 8798 |
|
8979 | 8799 | \rSec2[container.adaptors.general]{In general}
|
|
0 commit comments