[Issue 1714] New: Type specialization in IsExpression should work for templated types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 4 13:33:45 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1714
Summary: Type specialization in IsExpression should work for
templated types
Product: D
Version: 2.008
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: spec
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: dhasenan at gmail.com
class Bar (T) {}
static if (is (Bar!(int) T == T!(U), U)) // should evaluate to true, U == int,
T == ? probably Bar!(int)
{}
class Foo : Bar!(int) {}
static if (is (Foo T == T!(U), U)) // should evaluate to false
{}
static if (is (Foo T : T!(U), U)) // should evaluate to true, U == int
{}
Currently, you can do similar stuff in template specializations, but it should
be extended to IsExpressions, according to the documentation. So it's implied,
anyway.
--
More information about the Digitalmars-d-bugs
mailing list