* @return Nothing.
*/
template<typename _Tp>
- _GLIBCXX20_CONSTEXPR
- inline
-#if __cplusplus >= 201103L
- typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
- is_move_constructible<_Tp>,
- is_move_assignable<_Tp>>::value>::type
+#if __glibcxx_concepts // >= C++20
+ requires (! __is_tuple_like<_Tp>::value)
+ && is_move_constructible_v<_Tp>
+ && is_move_assignable_v<_Tp>
+ constexpr void
+#elif __cplusplus >= 201103L
+ _GLIBCXX20_CONSTEXPR inline
+ __enable_if_t<__and_<__not_<__is_tuple_like<_Tp>>,
+ is_move_constructible<_Tp>,
+ is_move_assignable<_Tp>>::value>
#else
- void
+ inline void
#endif
swap(_Tp& __a, _Tp& __b)
_GLIBCXX_NOEXCEPT_IF(__and_<is_nothrow_move_constructible<_Tp>,
// DR 809. std::swap should be overloaded for array types.
/// Swap the contents of two arrays.
template<typename _Tp, size_t _Nm>
- _GLIBCXX20_CONSTEXPR
- inline
-#if __cplusplus >= 201103L
- typename enable_if<__is_swappable<_Tp>::value>::type
+#if __glibcxx_concepts // >= C++20
+ requires is_swappable_v<_Tp>
+ constexpr void
+#elif __cplusplus >= 201103L
+ _GLIBCXX20_CONSTEXPR inline
+ __enable_if_t<__is_swappable<_Tp>::value>
#else
- void
+ inline void
#endif
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
_GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Tp>::value)