diff --git a/include/array b/include/array index 188d24d7f..888fac21e 100644 --- a/include/array +++ b/include/array @@ -270,7 +270,11 @@ operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) template _LIBCPP_INLINE_VISIBILITY inline -void +typename enable_if +< + __is_swappable<_Tp>::value, + void +>::type swap(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { diff --git a/include/tuple b/include/tuple index 49f220d0c..c075e42e9 100644 --- a/include/tuple +++ b/include/tuple @@ -587,7 +587,11 @@ public: template inline _LIBCPP_INLINE_VISIBILITY -void +typename enable_if +< + __all<__is_swappable<_Tp>::value...>::value, + void +>::type swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value) {__t.swap(__u);} diff --git a/include/utility b/include/utility index d0ad1ec86..6934c1e08 100644 --- a/include/utility +++ b/include/utility @@ -377,7 +377,12 @@ operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y) template inline _LIBCPP_INLINE_VISIBILITY -void +typename enable_if +< + __is_swappable<_T1>::value && + __is_swappable<_T2>::value, + void +>::type swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) _NOEXCEPT_((__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value))