On 08/20/2013 08:51 PM, Andrei Alexandrescu wrote:
On 8/19/13 11:39 PM, Timon Gehr wrote:
On 08/20/2013 02:18 AM, Andrei Alexandrescu wrote:

Why would it be necessary to return an object of type TypeTuple (i.e.
template tuple)?


- Elegance. Eg:

auto seq(T...)(T arg){ return arg; }

auto fold(alias a,S,R)(S start, R range){ ... }


seq(0,[1,2,3]).fold!((a,b)=>a+b);

But this is again a value tuple not a template tuple, no?

Andrei


In my understanding the former is a special case of the latter. Since you invented those terms, I might be mistaken. How do you distinguish between them?

Reply via email to