Today's weird D edge case
Les De Ridder
les at lesderid.net
Sun Jul 14 19:58:20 UTC 2019
On Sunday, 14 July 2019 at 00:23:49 UTC, Ethan wrote:
> On Sunday, 14 July 2019 at 00:22:10 UTC, Ethan wrote:
>> https://run.dlang.io/is/l5Vyn4
>>
>> Using an is statement inside a template constraint doesn't
>> propagate the is results in to a function. You have to static
>> if with the same is statement to make it work.
>
> https://run.dlang.io/is/rR5UCA
>
> And now with the full example. Derp.
I realise this doesn't work for all template constraints, but for
some
cases there's a workaround using normal type specialisation.
... and as I was about to show it, I hit an ICE (goes away when
you
uncomment the second line in the !compiles):
https://run.dlang.io/is/aWkOOo
More information about the Digitalmars-d
mailing list