aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/tuple
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2023-09-01 17:52:02 -0700
committerNikolas Klauser <nikolasklauser@berlin.de>2023-09-01 17:52:31 -0700
commit9f3e3efd98a29eb8df9e3ad43a573c9141d1ace2 (patch)
tree130e9e0c0e793901ede81829f9d0ca0cc76237b0 /libcxx/include/tuple
parent2f9cd6377f3d972ed8cf814225a02a353d6cc545 (diff)
downloadllvm-9f3e3efd98a29eb8df9e3ad43a573c9141d1ace2.zip
llvm-9f3e3efd98a29eb8df9e3ad43a573c9141d1ace2.tar.gz
llvm-9f3e3efd98a29eb8df9e3ad43a573c9141d1ace2.tar.bz2
[libc++][NFC] Refactor __enable_if return types to defaulted template parameters
This brings most of the enable_ifs in libc++ to the same style. It also has the nice side-effect of reducing the size of names of these symbols, since the depedent return type is shorter. Reviewed By: #libc, ldionne Spies: ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D157787
Diffstat (limited to 'libcxx/include/tuple')
-rw-r--r--libcxx/include/tuple4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 02998a4..609ae53 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -1367,9 +1367,9 @@ template <class _Alloc, class ..._Tp>
tuple(allocator_arg_t, _Alloc, tuple<_Tp...>) -> tuple<_Tp...>;
#endif
-template <class ..._Tp>
+template <class ..._Tp, __enable_if_t<__all<__is_swappable<_Tp>::value...>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
-__enable_if_t<__all<__is_swappable<_Tp>::value...>::value, void>
+void
swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
_NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
{__t.swap(__u);}