C++0x Concepts - Dead?
Walter Bright
newshound1 at digitalmars.com
Wed Jul 15 15:15:38 PDT 2009
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.
More information about the Digitalmars-d-announce
mailing list