Skip to content

Commit 7a2e73d

Browse files
authored
[swappable.requirements] Change "Requires" to "Preconditions" (#4886)
1 parent 166af4d commit 7a2e73d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/lib-intro.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,17 +1612,18 @@
16121612
User code can ensure that the evaluation of \tcode{swap} calls
16131613
is performed in an appropriate context under the various conditions as follows:
16141614
\begin{codeblock}
1615+
#include <cassert>
16151616
#include <utility>
16161617

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)}.
16181619
template<class T, class U>
16191620
void value_swap(T&& t, U&& u) {
16201621
using std::swap;
16211622
swap(std::forward<T>(t), std::forward<U>(u)); // OK: uses ``swappable with'' conditions
16221623
// for rvalues and lvalues
16231624
}
16241625

1625-
// Requires: lvalues of \tcode{T} shall be swappable.
1626+
// Preconditions: lvalues of \tcode{T} are swappable.
16261627
template<class T>
16271628
void lv_swap(T& t1, T& t2) {
16281629
using std::swap;

0 commit comments

Comments
 (0)