[PATCH] [libcxx] Delay evaluation of __make_tuple_types to prevent blowing the max template instantiation depth. Fixes Bug #18345
Howard Hinnant
howard.hinnant at gmail.com
Sun Oct 19 16:16:50 PDT 2014
On Oct 1, 2014, at 12:16 PM, Howard Hinnant <howard.hinnant at gmail.com> wrote:
>> or
>>
>> using A = std::array<double,3>;
>> A a;
>> std::tuple<double,double,double> t;
>> t = a;
>
> This is another extension. This example would already work if A is pair, instead of std::array. libc++ introduces the concept of “tuple-like”, and tuple cleanly interoperates with tuple-like types. The set of tuple-like types are pair and array. One might imagine making complex tuple-like as well.
>
> See <__tuple> for the __tuple_like<T> trait which controls this behavior.
>
> This extension has not been proposed for standardization.
tuple-like now seen in the wild:
http://stackoverflow.com/a/26454142/576911
:-)
Howard
More information about the cfe-commits
mailing list