Can we deprecate "D-style Variadic Functions"

Freddy via Digitalmars-d digitalmars-d at puremagic.com
Fri Mar 27 14:07:40 PDT 2015


On Friday, 27 March 2015 at 20:57:51 UTC, Freddy wrote:
> 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);
> 	}
> }
> ```
I haven't looked in dmd's source yet but doesn't the compiler 
have to do (an inlined version of) this anyway for runtime 
variadic functions.


More information about the Digitalmars-d mailing list