← Back to index
|
Original Bugzilla link
Bug 9064 – Add isInstanceOf to std.traits
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-23T05:44:00Z
Last change time
2012-11-24T09:56:58Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0
by andrej.mitrovich — 2012-11-23T05:44:31Z
struct Foo(T...) { } struct Bar(T...) { } void main() { static assert(isInstanceOf!(Foo, Foo!int)); static assert(!isInstanceOf!(Foo, Bar!int)); static assert(!isInstanceOf!(Foo, int)); static assert(!__traits(compiles, isInstanceOf!(Foo, Foo))); }
Comment #1
by andrej.mitrovich — 2012-11-23T06:02:54Z
https://github.com/D-Programming-Language/phobos/pull/970
Comment #2
by github-bugzilla — 2012-11-24T09:56:17Z
Commits pushed to master at
https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/e02593090a909948183921f6f00039ce3f37acff
Fixes Issue 9064 - Add isInstanceOf trait.
https://github.com/D-Programming-Language/phobos/commit/cc9461baa82767412ff329514a1255aa33af31aa
Merge pull request #970 from AndrejMitrovic/Fix9064 Fixes Issue 9064 - Add isInstanceOf trait