February 04, 2021 Re: How to tell between int[] and int[]... with introspection? | ||||
---|---|---|---|---|
| ||||
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. |
Copyright © 1999-2021 by the D Language Foundation