template alias

Luke J. West luke at west.me.uk
Sun Jan 23 10:37:13 PST 2011


Hi,

I don't want to keep typing isNumeric!T | isSomeChar!T. I want to type
isBuiltIn!T instead, but am trying to work out how to implement it.
Something like


template isBuiltInT(T) {const bool t=isNumeric!T | isSomeChar!T};}

alias isBuiltInT.t isBuiltIn;


But that doesn't compile. How should I be doing it?
(Of course I'm assuming that isNumeric!T | isSomeChar!T captures all
primitives.)

Thanks,

Luke


More information about the Digitalmars-d-learn mailing list