diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-06-01 23:59:32 +0400 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-06-01 23:59:32 +0400 |
commit | bc95cf0d5f566dfcb099154aa9520354483b592b (patch) | |
tree | 39d452375e1fa2b1222c25842a1a5fe213274fc1 /libcxx/include/utility | |
parent | 690030c11645c8d39b6689d34ff5044eee394e08 (diff) |
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
Diffstat (limited to 'libcxx/include/utility')
-rw-r--r-- | libcxx/include/utility | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility index d0ad1ec86e0a..6934c1e08d94 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -377,7 +377,12 @@ operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y) 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)) |