Using traits how do i get a function's parameters as a string?

Jacob Carlborg doob at me.com
Wed Sep 4 06:01:40 PDT 2013


On 2013-09-04 13:54, Andrej Mitrovic wrote:

> It's really funky that an is() expression is used to extract this:
>
> static if (is(FunctionTypeOf!func PT == __parameters)) { }
>
> I'd assume it would be __traits(getParams, ...).

I agree. Wonder why this approach was chosen.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list