Variadic template arguments unpacking

Max Strakhov monnoroch at gmail.com
Sat Jul 6 10:29:35 PDT 2013


> The following should work though:
>
> printf( "...", ForEach!(tmp => tmp.c_str())(ForEach!(val => 
> conv(val))(values).tuple).tuple );

I had the same idea too, but couldn't make it work: compiler 
complains about failed CTFE or something. On the other hand i 
might do somethong wrong.

> It's a defect in ForEach though, and gives me more reason to 
> ask for the C++ style ellipsis expansion operator for D.

Yeap, i personally find (as * 2)... awesome feature of c++.


More information about the Digitalmars-d-learn mailing list