diff options
author | theraven <theraven@FreeBSD.org> | 2012-05-03 17:44:07 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2012-05-03 17:44:07 +0000 |
commit | 011d8001e295ab428f3d73602d2e4fa0b248efc4 (patch) | |
tree | a0abba0a80f7ff64ba1a78df7fd8544414370f33 /contrib/libc++/include/tuple | |
parent | 72d6cdcd97718bf58e38b0484a01bf5c6de14bc4 (diff) | |
download | FreeBSD-src-011d8001e295ab428f3d73602d2e4fa0b248efc4.zip FreeBSD-src-011d8001e295ab428f3d73602d2e4fa0b248efc4.tar.gz |
Import new version of libc++. Among other improvements, this comes with an
<atomic> header that works with clang 3.1 (and, importantly, the pre-3.1
snapshot currently in head)
Diffstat (limited to 'contrib/libc++/include/tuple')
-rw-r--r-- | contrib/libc++/include/tuple | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/contrib/libc++/include/tuple b/contrib/libc++/include/tuple index 2bdb05f..683c9dd 100644 --- a/contrib/libc++/include/tuple +++ b/contrib/libc++/include/tuple @@ -552,7 +552,7 @@ public: ) {} template <class ..._Up, - class = typename enable_if + typename enable_if < sizeof...(_Up) <= sizeof...(_Tp) && __tuple_convertible @@ -562,8 +562,40 @@ public: sizeof...(_Up) < sizeof...(_Tp) ? sizeof...(_Up) : sizeof...(_Tp)>::type - >::value - >::type + >::value, + bool + >::type = false + > + _LIBCPP_INLINE_VISIBILITY + tuple(_Up&&... __u) + : base_(typename __make_tuple_indices<sizeof...(_Up)>::type(), + typename __make_tuple_types<tuple, sizeof...(_Up)>::type(), + typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(), + typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(), + _VSTD::forward<_Up>(__u)...) {} + + template <class ..._Up, + typename enable_if + < + sizeof...(_Up) <= sizeof...(_Tp) && + __tuple_constructible + < + tuple<_Up...>, + typename __make_tuple_types<tuple, + sizeof...(_Up) < sizeof...(_Tp) ? + sizeof...(_Up) : + sizeof...(_Tp)>::type + >::value && + !__tuple_convertible + < + tuple<_Up...>, + typename __make_tuple_types<tuple, + sizeof...(_Up) < sizeof...(_Tp) ? + sizeof...(_Up) : + sizeof...(_Tp)>::type + >::value, + bool + >::type =false > _LIBCPP_INLINE_VISIBILITY explicit @@ -598,15 +630,29 @@ public: _VSTD::forward<_Up>(__u)...) {} template <class _Tuple, - class = typename enable_if + typename enable_if < - __tuple_convertible<_Tuple, tuple>::value - >::type + __tuple_convertible<_Tuple, tuple>::value, + bool + >::type = false > _LIBCPP_INLINE_VISIBILITY tuple(_Tuple&& __t) : base_(_VSTD::forward<_Tuple>(__t)) {} + template <class _Tuple, + typename enable_if + < + __tuple_constructible<_Tuple, tuple>::value && + !__tuple_convertible<_Tuple, tuple>::value, + bool + >::type = false + > + _LIBCPP_INLINE_VISIBILITY + explicit + tuple(_Tuple&& __t) + : base_(_VSTD::forward<_Tuple>(__t)) {} + template <class _Alloc, class _Tuple, class = typename enable_if < |