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)

Reply via email to