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.
llvm-svn: 132421
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: bc95cf0d5f566dfcb099154aa9520354483b592b
diff --git a/include/array b/include/array
index 188d24d..888fac2 100644
--- a/include/array
+++ b/include/array
@@ -270,7 +270,11 @@
template <class _Tp, size_t _Size>
_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)
{