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