On Thursday, 7 May 2020 at 09:22:28 UTC, learner wrote:
Good morning,

Is there a reason why std.variant.visit is not inferring pure?


I think `variant` will not infer any trributes. I'm not sure why. It could be some language limitation (that's the reason why `std.range.enumerate` does not infer attributes for example). Or it could be just badly implemented.

Either way, there are DUB packages that are better in this (and other) regards. I recommend Taggedalgebraic[1].

[1] https://code.dlang.org/packages/taggedalgebraic

Reply via email to