[Issue 14758] TypeInfo causes excessive binary bloat

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 21 05:31:12 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14758

--- Comment #12 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> ---
Downcasts can be done the COM way:

void* TypeId(T)=&TypeId;

final T toType(T)()
{
  cast(T)toType(TypeId!T); //reinterpret_cast
}

override void* toType(void* typeId)
{
  if(typeId==TypeId!Me)return this;
}

--


More information about the Digitalmars-d-bugs mailing list