static map as a type function
Steven Schveighoffer
schveiguy at gmail.com
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.
>
> https://issues.dlang.org/show_bug.cgi?id=9945
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).
-Steve
More information about the Digitalmars-d
mailing list