File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1612
1612
User code can ensure that the evaluation of \tcode {swap} calls
1613
1613
is performed in an appropriate context under the various conditions as follows:
1614
1614
\begin {codeblock }
1615
+ #include <cassert>
1615
1616
#include <utility>
1616
1617
1617
- // Requires : \tcode {std::forward<T>(t)} shall be swappable with \tcode {std::forward<U>(u)}.
1618
+ // Preconditions : \tcode {std::forward<T>(t)} is swappable with \tcode {std::forward<U>(u)}.
1618
1619
template<class T, class U>
1619
1620
void value_swap(T&& t, U&& u) {
1620
1621
using std::swap;
1621
1622
swap(std::forward<T>(t), std::forward<U>(u)); // OK: uses `` swappable with'' conditions
1622
1623
// for rvalues and lvalues
1623
1624
}
1624
1625
1625
- // Requires : lvalues of \tcode {T} shall be swappable.
1626
+ // Preconditions : lvalues of \tcode {T} are swappable.
1626
1627
template<class T>
1627
1628
void lv_swap(T& t1, T& t2) {
1628
1629
using std::swap;
You can’t perform that action at this time.
0 commit comments