Bug 11829 – Documentation of implicit template argument conversion out of date.
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-27T04:40:00Z
Last change time
2014-04-22T21:03:58Z
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2013-12-27T04:40:28Z
http://dlang.org/template.html
"Even if template arguments are implicitly converted to the same template parameter type, they still refer to different instances:
struct TFoo(int x) { }
static assert(is(TFoo!(3) == TFoo!(2 + 1))); // 3 and 2+1 are both 3 of type int
static assert(!is(TFoo!(3) == TFoo!(3u))); // 3u and 3 are different types"
I think this has been fixed in a recent release.
Comment #1 by andrej.mitrovich — 2014-04-22T21:03:58Z