std.sumtype?

rm rymrg at memail.com
Thu Mar 18 15:37:52 UTC 2021


On 18/03/2021 17:12, Paul Backus wrote:
> On Thursday, 18 March 2021 at 15:04:13 UTC, rm wrote:
>> This makes it really complicated to use in @nogc, since you cannot 
>> even create delegates to change things in your scope.
> 
> Yes you can. There's even a unit test for this specific use-case:
> 
> https://github.com/dlang/phobos/blob/8281af7310aa876f2bdeb30fd176d952141b4c96/std/sumtype.d#L2403-L2410 
> 
I stand corrected. Now I'm going to have to go back to figure what was 
wrong with my code back then.

I would still like to have tryMatch in @nogc.


More information about the Digitalmars-d mailing list