Can we deprecate "D-style Variadic Functions"
Freddy via Digitalmars-d
digitalmars-d at puremagic.com
Fri Mar 27 13:57:50 PDT 2015
On Friday, 27 March 2015 at 19:59:13 UTC, deadalnix wrote:
> To be fair, this is most likely going to be inlined an ditched
> away with any decent optimizer.
It wouldn't even need alloca if sizeof and address of worked with
tuples.
```
template VariadicFunction(alias Imp){
auto VariadicFunction(T...)(T args){
void* data=&args;
TypeInfo[T.length] rtti;
foreach(i,type;T){
rtti[i]=typeid(type);
}
Imp(data,rtti);
}
}
```
More information about the Digitalmars-d
mailing list