How to declare function with the same call signature as another?

Tofu Ninja via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Nov 23 16:51:01 PST 2016


On Thursday, 24 November 2016 at 00:36:54 UTC, ketmar wrote:
> On Thursday, 24 November 2016 at 00:19:04 UTC, Tofu Ninja wrote:
>> You still can't replicate a function with this.
> you can, by using std.traits and string mixins.

Even with std.traits, you can't know which arguments are 
variadic. The only way to actually replicate a function is with 
string mixins and parsing the stringof of the function you want 
to replicate. This (ref int) thing does not help one bit and will 
only trick people into thinking they are properly replicating the 
call signature when they are not.


More information about the Digitalmars-d-learn mailing list