July 15, 2009
Christian Kamm:
> Is there a difference between
> template Foo(T : U) {} and
> template Foo(T) if(is(T : U)) {} ?

I think if() offers better error messages here (I have not tried it in this case, so I may be wrong).
Even if I am right, it's not inevitable, GCC shows to give better error messages (better == the first line of error shows the line number where you have tried to instantiate the template).

See also: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=92766

I have tried to ask this (simple?) but handy feature to LDC developers, but they have answered me that it's something that has to be done by the front-end (by Walter, mostly), so it's not something LDC devs want to to add just to LDC for me :-)

Bye,
bearophile