A very small update on typefunctions
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 ....
> Looks pretty cool.
>> alias x = ThisIsAType;
>> pragma(msg, "typeWithTags: ", typeWithFilteredTags(x));
>> //output: TypeWithTags((ThisIsAType), [SuperTag("Smoking Super
>> Style"), SuperTag("Super!")]
> 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: ",
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
More information about the Digitalmars-d