I dun a DIP, possibly the best DIP ever

Stefan Koch uplink.coder at googlemail.com
Fri Apr 24 06:42:53 UTC 2020


On Friday, 24 April 2020 at 06:37:42 UTC, WebFreak001 wrote:
> On Friday, 24 April 2020 at 06:32:16 UTC, Walter Bright wrote:
>> [...]
>>
>>> // replace staticMap
>>> alias staticMap(alias F, T...) = F!T...;
>>
>> alias staticMap(alias F, T...) = F!T;
>>
>> [...]
>
> this would be a breaking change:
>
> currently:
> template F(T...)
> {
> }
>
> alias staticMap(alias F, T...) = F!T;
>
> pragma(msg, staticMap!(F, int, short).stringof);
> -> F!(int, short)
>
> but with that change suddenly:
> pragma(msg, staticMap!(F, int, short).stringof);
> -> SomeTuple!(F!int, F!short)

nope, compile error.
F does not have an eponymous member.


More information about the Digitalmars-d mailing list