Template constraints in D
Sean Kelly
sean at invisibleduck.org
Sat Jun 21 17:39:56 PDT 2008
== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> Walter Bright:
> > http://www.digitalmars.com/d/2.0/concepts.html
> They look nice (but I may use a bigger list of examples to understand how they can be used). What
can they do that can't be done with the things already present?
Nothing. But it's a very convenient syntactic sugar on top of existing
techniques, such as:
http://www.digitalmars.com/d/archives/digitalmars/D/Stroustrup_s_talk_on_C_0x_57104.html#N5737
9
Walter had even asked me to write an article about this, but I never
followed through :p
I will say that the __traits(compiles, blah) trick is totally awesome. I
was trying to do this in D 1.0 the other day and couldn't find a way to
make it work. Figures it would require D 2.0. *sigh*
Sean
More information about the Digitalmars-d
mailing list