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
This commit is contained in:
Howard Hinnant
2011-06-01 19:59:32 +00:00
parent d737382dfd
commit aabf28721b
3 changed files with 16 additions and 3 deletions

View File

@@ -587,7 +587,11 @@ public:
template <class ..._Tp>
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);}