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.