Flatten tuple_constructible, tuple_convertible and tuple_assignable.

This patch is the last in a series that replaces recursive meta-programming
in std::tuple with non-recursive implementations.

Previously std::tuple could only be instantiated with 126 elements before
it blew the max template instantiation depth. Now the size of std::tuple is
essentially unbounded (I've tested with over 5000 elements).

One unfortunate side-effect of this change is that tuple_constructible
and similar no longer short circuit after the first failure. Instead they
evaluate the conditions for all elements. This could be potentially breaking.
I plan to look into this further.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274331 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-07-01 04:07:39 +00:00
parent 053859ffc6
commit ed33ed8023
2 changed files with 40 additions and 82 deletions

View File

@@ -379,11 +379,6 @@ template <class ..._Tp>
_LIBCPP_INLINE_VISIBILITY
void __swallow(_Tp&&...) _NOEXCEPT {}
template <bool ..._Pred>
struct __all
: is_same<__all<_Pred...>, __all<(_Pred, true)...>>
{ };
template <class ..._Tp>
struct __lazy_all : __all<_Tp::value...> {};