Christian Kamm wrote:
BLS Wrote:
I have somehow the idea that D constraints and template specialization should merge.

I also feel that specialization may just be a special case of constraints -
with the added benefit that implicit function template instantiation works.

Is there a difference between
template Foo(T : U) {} and template Foo(T) if(is(T : U)) {} ?


Yes. Constraints determine the list of candidate template declarations, but do not participate in the partial ordering of candidates to determine the 'best' match.

Reply via email to