Specialization - Major hole in the spec?
Trass3r
un at known.com
Thu Jan 5 13:37:18 PST 2012
On Thursday, 5 January 2012 at 15:11:13 UTC, Timon Gehr wrote:
> On 01/05/2012 10:14 AM, Peter Alexander wrote:
>> In any case, it is surely a bug. I have *explicitly* specified
>> that T
>> must be int, yet it has called a version with T == float.
>
> No it has called a version with T : float. ":" means
> "implicitly converts to". This is by design.
I think we should rename this to something like 'type constraint'
instead of specialization (and add the explanation that it means
implicitly converts). As this thread shows C++ programmers will
be confused otherwise.
More information about the Digitalmars-d
mailing list