From 78ff3f485ea4f8e75f7cda72ca65d63690c26a59 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Thu, 9 Sep 2021 10:16:32 -0500 Subject: [PATCH 1/3] Requires should now be Mandates --- source/lib-intro.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 51e39e8fe5..ad266b8561 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1614,7 +1614,7 @@ \begin{codeblock} #include -// Requires: \tcode{std::forward(t)} shall be swappable with \tcode{std::forward(u)}. +// Mandates: \tcode{std::forward(t)} shall be swappable with \tcode{std::forward(u)}. template void value_swap(T&& t, U&& u) { using std::swap; @@ -1622,7 +1622,7 @@ // for rvalues and lvalues } -// Requires: lvalues of \tcode{T} shall be swappable. +// Mandates: lvalues of \tcode{T} shall be swappable. template void lv_swap(T& t1, T& t2) { using std::swap; From ede308c3178c0e76b9ce92a775983ad62afa9ec0 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Thu, 9 Sep 2021 10:25:56 -0500 Subject: [PATCH 2/3] Shalls shall not exist. --- source/lib-intro.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index ad266b8561..a73e22f946 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1614,7 +1614,7 @@ \begin{codeblock} #include -// Mandates: \tcode{std::forward(t)} shall be swappable with \tcode{std::forward(u)}. +// Mandates: \tcode{std::forward(t)} is swappable with \tcode{std::forward(u)}. template void value_swap(T&& t, U&& u) { using std::swap; @@ -1622,7 +1622,7 @@ // for rvalues and lvalues } -// Mandates: lvalues of \tcode{T} shall be swappable. +// Mandates: lvalues of \tcode{T} are swappable. template void lv_swap(T& t1, T& t2) { using std::swap; From 1345785106f67cb039737e23321fbebd1b4b369c Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Sat, 25 Sep 2021 10:30:20 -0500 Subject: [PATCH 3/3] Preconditions: Mandates shall be required. --- source/lib-intro.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index a73e22f946..9035830374 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1612,9 +1612,10 @@ User code can ensure that the evaluation of \tcode{swap} calls is performed in an appropriate context under the various conditions as follows: \begin{codeblock} +#include #include -// Mandates: \tcode{std::forward(t)} is swappable with \tcode{std::forward(u)}. +// Preconditions: \tcode{std::forward(t)} is swappable with \tcode{std::forward(u)}. template void value_swap(T&& t, U&& u) { using std::swap; @@ -1622,7 +1623,7 @@ // for rvalues and lvalues } -// Mandates: lvalues of \tcode{T} are swappable. +// Preconditions: lvalues of \tcode{T} are swappable. template void lv_swap(T& t1, T& t2) { using std::swap;