First life-signs of type functions

Stefan Koch uplink.coder at googlemail.com
Wed May 13 06:04:10 UTC 2020


On Wednesday, 13 May 2020 at 02:00:37 UTC, Clueless wrote:
> On Wednesday, 6 May 2020 at 11:58:36 UTC, Stefan Koch wrote:
>> Hello Guys,
>>
>> After a bit of fiddling the following code (and only that 
>> because I need do partial evaluation of the semantic pass on 
>> the function body manually ...)
>> Now works on the Talias branch
>>
>> string F(alias y)
>> {
>>     return y.stringof;
>> }
>> static assert(F!(ulong) == "ulong");
>> static assert(F!(uint) == "uint");
>
> Since type functions aren't templates, and they're functions, 
> could UFCS be applied?

Possibly depends on whether it introduces ambiguity.


More information about the Digitalmars-d mailing list