Calling std.variant.visit from a pure function

Paul Backus via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 4 20:10:07 PDT 2016


On Friday, 4 November 2016 at 23:38:47 UTC, sarn wrote:
> I suggest trying it with the latest dmd and filing a bug 
> report.  Taking a quick look at the library code 
> (https://github.com/dlang/phobos/blob/master/std/variant.d), it 
> *seems* like everything uses templates and functions returning 
> auto, so the pureness of visit should be inferred if possible.

Just tried it with 2.072, and I get the same error, so I've 
submitted a bug report: 
https://issues.dlang.org/show_bug.cgi?id=16662


More information about the Digitalmars-d-learn mailing list