[Issue 9945] New: Add typeFromId __traits
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 16 14:56:56 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9945
Summary: Add typeFromId __traits
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
Depends on: 9943
--- Comment #0 from timon.gehr at gmx.ch 2013-04-16 14:56:55 PDT ---
Once typeid can be returned from functions, something like this could become
useful:
auto foo(){ return typeid(int); }
static assert(is(__traits(typeFromId, foo())==int));
i.e., add a way to map a type id to its corresponding type at compile time.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list