Skip to content

Commit a818d5b

Browse files
CaseyCarterzygoloid
authored andcommitted
[concepts.swappable] Correct example
1 parent db9aee9 commit a818d5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/concepts.tex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,16 +690,18 @@
690690
User code can ensure that the evaluation of \tcode{swap} calls
691691
is performed in an appropriate context under the various conditions as follows:
692692
\begin{codeblock}
693+
#include <cassert>
694+
#include <concepts>
693695
#include <utility>
694696

695-
template<class T, SwappableWith<T> U>
697+
template<class T, std::SwappableWith<T> U>
696698
void value_swap(T&& t, U&& u) {
697699
using std::swap;
698700
swap(std::forward<T>(t), std::forward<U>(u)); // OK: uses ``swappable with'' conditions
699701
// for rvalues and lvalues
700702
}
701703

702-
template<Swappable T>
704+
template<std::Swappable T>
703705
void lv_swap(T& t1, T& t2) {
704706
using std::swap;
705707
swap(t1, t2); // OK: uses swappable conditions for

0 commit comments

Comments
 (0)