File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 706
706
User code can ensure that the evaluation of \tcode {swap} calls
707
707
is performed in an appropriate context under the various conditions as follows:
708
708
\begin {codeblock }
709
+ #include <cassert>
710
+ #include <concepts>
709
711
#include <utility>
710
712
711
- template <class T, SwappableWith<T> U>
713
+ template <class T, std:: SwappableWith<T> U>
712
714
void value_swap(T&& t, U&& u) {
713
715
using std::swap;
714
716
swap(std::forward<T>(t), std::forward<U>(u)); // OK: uses `` swappable with'' conditions
715
717
// for rvalues and lvalues
716
718
}
717
719
718
- template <Swappable T>
720
+ template <std:: Swappable T>
719
721
void lv_swap(T& t1, T& t2) {
720
722
using std::swap;
721
723
swap(t1, t2); // OK: uses swappable conditions for
You can’t perform that action at this time.
0 commit comments