How to tell between int[] and int[]... with introspection?

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Feb 4 17:24:34 UTC 2021


On Thu, Feb 04, 2021 at 09:18:27AM -0800, H. S. Teoh via Digitalmars-d wrote:
> Given these functions:
> 
> 	int func1(string x, int[] y);
> 	int func2(string x, int[] y...);
> 
> Is there a way to tell, using compile-time introspection, the
> difference between their signatures?
[...]

Nevermind, just realized that there is std.traits.variadicFunctionStyle
and __traits(getFunctionVariadicStyle).  Should have RTFM before
asking...


T

-- 
All men are mortal. Socrates is mortal. Therefore all men are Socrates.


More information about the Digitalmars-d mailing list