static map as a type function

Steven Schveighoffer schveiguy at
Thu Sep 24 12:58:54 UTC 2020

On 9/24/20 6:12 AM, Timon Gehr wrote:
> On 24.09.20 07:13, Andrei Alexandrescu wrote:
>> A few comments:
>> * Currently mixin closes the circle by taking back the typeid to the 
>> type it started from. It would be nice to have something better, e.g. 
>> t.Type would just be the type.

Hm... so I'm guessing TypeInfo.Type or __traits(typeFromId) would only 
work for CTFE?

That sounds interesting. Could be a different way to implement type 
functions, without requiring a new mechanism of passing type data. And 
there is the potential (I think) of making functions that are only type 
functions for CTFE, and can do something different if used at runtime 
(via __ctfe).


More information about the Digitalmars-d mailing list