Checking for Callabilty of either f(x) or x.f

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 1 08:09:48 PDT 2014


On Friday, 1 August 2014 at 14:20:55 UTC, Nordlöw wrote:
> A more flexible solution is to not require toX to be a member 
> function of type specific (system) types to printed.

My suggestions is something like

     __traits(compiles, auto x = arg.toMathML())

Is this my best option?

The snippet

     __traits(compiles

is quite fast right?


More information about the Digitalmars-d-learn mailing list