Yet another "compile-time reflection revisited" proposal

Timon Gehr timon.gehr at gmx.ch
Tue Nov 29 15:01:01 PST 2011


On 11/29/2011 11:43 PM, RivenTheMage wrote:
>> Yes, __traits should be replaced by a cleaner design eventually.
>> 'is'-expressions, typeid and std.traits are perfectly fine as they are
>> now and I don't see any reason to make their syntax more complicated.
>
> Before all, why typeid() is named typeID()? The return type is TypeInfo :)

It can be used to identify the type because it is a unique reference.

T a,b;
assert(typeid(a) is typeid(b));



More information about the Digitalmars-d mailing list