We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db9aee9 commit a818d5bCopy full SHA for a818d5b
source/concepts.tex
@@ -690,16 +690,18 @@
690
User code can ensure that the evaluation of \tcode{swap} calls
691
is performed in an appropriate context under the various conditions as follows:
692
\begin{codeblock}
693
+#include <cassert>
694
+#include <concepts>
695
#include <utility>
696
-template<class T, SwappableWith<T> U>
697
+template<class T, std::SwappableWith<T> U>
698
void value_swap(T&& t, U&& u) {
699
using std::swap;
700
swap(std::forward<T>(t), std::forward<U>(u)); // OK: uses ``swappable with'' conditions
701
// for rvalues and lvalues
702
}
703
-template<Swappable T>
704
+template<std::Swappable T>
705
void lv_swap(T& t1, T& t2) {
706
707
swap(t1, t2); // OK: uses swappable conditions for
0 commit comments