Christian Kamm wrote:
Christian Kamm wrote:
Is there a difference between
template Foo(T : U) {} and
template Foo(T) if(is(T : U)) {} ?
Walter Bright wrote:
Yes. Constraints determine the list of candidate template declarations,
but do not participate in the partial ordering of candidates to
determine the 'best' match.
Thanks for the explanation!
I expect the reason is that for constrained templates it is impossible to
determine whether all valid template arguments for one would lead to a valid
instantiation of another?
That's a good technical reason, but I also felt that the current way
just made intuitive sense.