A template for method forwarding?

dsimcha dsimcha at yahoo.com
Fri Dec 12 13:17:04 PST 2008

== Quote from Bill Baxter (wbaxter at gmail.com)'s article
> Cool.  I don't see anything D2 specific there, so I think it should
> work in D1 ok.
> std.traits.ParameterTypeTuple and std.traits.ReturnType both exist in
> D1, if that's what you were worried about.
> I think there may be a problem with 0-arg functions in the code?
> You handle the void return type (which I'm not sure is necessary
> actually -- I think D lets you say "return foo()" for a void function
> specifically to handle this kind of template situation), but I think
> maybe you don't handle a void argument?    I'm getting an error with
> that for some reason... will dig more.
> --bb

IDK, it works for me on DMD 2.21, including the no arguments case.  Your mileage
may vary on other compiler versions, since this is some really hackish

More information about the Digitalmars-d mailing list