concepts: swappable should test using std::swap

This commit is contained in:
Danny Robson 2020-02-24 14:36:59 +11:00
parent df924f049b
commit 8ddf4a915d

View File

@ -83,7 +83,7 @@ namespace cruft::concepts {
template <typename T> template <typename T>
concept swappable = requires (T &&a, T &&b) { swap (a, b); }; concept swappable = requires (T &&a, T &&b) { std::swap (a, b); };
template < class T > template < class T >
@ -167,7 +167,7 @@ namespace cruft::concepts {
{ a.cend () } -> same_as<typename T::const_iterator>; { a.cend () } -> same_as<typename T::const_iterator>;
{ a.swap (b) } -> same_as<void>; { a.swap (b) } -> same_as<void>;
{ swap (a, b) } -> same_as<void>; { std::swap (a, b) } -> same_as<void>;
{ a.size () } -> same_as<typename T::size_type>; { a.size () } -> same_as<typename T::size_type>;
{ a.max_size () } -> same_as<typename T::size_type>; { a.max_size () } -> same_as<typename T::size_type>;