Use the eponymous trick: import std.stdio; import std.traits; template isBuiltInT(T) { enum isBuiltInT = isNumeric!T || isSomeChar!T; } void main() { assert(isBuiltInT!(int)); assert(isBuiltInT!(char)); }