C++0x Concepts - Dead?

aarti_pl aarti at interia.pl
Thu Jul 16 16:04:53 PDT 2009


Walter Bright pisze:
> aarti_pl wrote:
>> How would you do currently in D?
> 
> template (T) if (T.init + T.init)
> {
> }

in D1.0

template(T if typeof(T.init + T.init) == T)

or in D2.0

template(T if __traits(compiles, T.init + T.init))

I could mess something in above examples, but as you can see, getting it 
to work is not a problem of my syntax for templates. It is just a matter 
of using proper syntax for compile time reflection.

BR
Marcin Kuszczak
(aarti_pl)


More information about the Digitalmars-d-announce mailing list