class specialization for integral types

Jonathan M Davis jmdavisProg at gmx.com
Sat Sep 24 17:49:31 PDT 2011


On Saturday, September 24, 2011 17:41:52 Charles Hixson wrote:
> I spoke too soon.
> class	AA(Key, Data)	if	(isNumeric (Key) )
>   didn't work with a larger case,

isNumeric!Key

std.straits.isNumeric is an eponymous template, _not_ a function. I believe 
that everything in std.traits is an eponymous template, and pretty much 
anything that takes a type is going to be a template, and not a function. Look 
at the examples in std.traits, and you'll notice that they all use !.

But essentially, it sounds like what you've been trying to do is failing, 
because you're treating the eponymous templates in std.traits as if they were 
functions.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list