A very small update on typefunctions
Stefan Koch
uplink.coder at googlemail.com
Sat Aug 1 00:29:26 UTC 2020
On Wednesday, 29 July 2020 at 14:39:02 UTC, jmh530 wrote:
> On Tuesday, 28 July 2020 at 23:12:28 UTC, Stefan Koch wrote:
>> Hi there,
>>
>> After a hunt of segfaults, I wanted to have some fun again.
>>
>> So ....
>>
>> [snip]
>
> Looks pretty cool.
>
>> [snip]
>> alias x = ThisIsAType;
>>
>> pragma(msg, "typeWithTags: ", typeWithFilteredTags(x));
>> //output: TypeWithTags((ThisIsAType), [SuperTag("Smoking Super
>> Style"), SuperTag("Super!")]
>> [snip]
>
> Is the only way this works by using an alias statement like
> that? Assuming this works progresses to a more complete and
> finished state, would there be scope for adjusting the
> semantics of alias function parameters in some way to handle
> situations like this? Or alternately, being able to write
> something like
> pragma(msg, "typeWithTags: ",
> ThiIsAType.alias.typeWithFilteredTags));
Now I see what you are asking.
There is no need to assign the type to an alias first.
pragma(msg, "typeWithTags: ", ThisIsAType.typeWithFilteredTags);
Should work as well.
UFCS support is a little sketchy though in the current
Implementation state.
More information about the Digitalmars-d
mailing list