Check for presence of function

Philippe Sigaud philippe.sigaud at gmail.com
Sun Mar 23 05:57:15 PDT 2014


Ideally, the alias part of the grammar could be extended and
isSomething simplified as:

alias isSomething(T) = __traits(compiles,
        {
           Unrelated* up;
           T.init.doSomething(up);
        }
    );

But this is not accepted by the grammar right now, because of __traits()


More information about the Digitalmars-d-learn mailing list