One step out of the TypeInfo stalemate

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jul 28 15:51:33 UTC 2020


On 7/28/20 10:33 AM, Adam D. Ruppe wrote:
> On Tuesday, 28 July 2020 at 14:28:09 UTC, Andrei Alexandrescu wrote:
>> More progress - now __typeid comes with statically-typed overloads, so 
>> whenever T is statically known, typeid(T).whatever() will pick an 
>> efficient inlined implementation instead of a virtual call.
> 
> What's potentially interesting here is you *might* be able to add an 
> alias StaticType = T in there and then do some pseudo-type manipulation 
> in CTFE then get the original type back out.

Added: 
https://github.com/dlang/druntime/pull/3174/files#diff-a68e58fcf0de5aa198fcaceafe4e8cf9R441



More information about the Digitalmars-d mailing list