Experimental support for a meaningful __is_swappable<T>::value. This does not appear to be strictly needed for correct functioning of the library. If it causes any problems, I'd rather pull it sooner rather than later.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132421 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/utility b/include/utility
index d0ad1ec..6934c1e 100644
--- a/include/utility
+++ b/include/utility
@@ -377,7 +377,12 @@
template <class _T1, class _T2>
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))