variant visit not pure?

learner learner at nomail.com
Thu May 7 09:22:28 UTC 2020


Good morning,

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

```
void test() pure {
     Algebraic!(int, string) alg;
     visit!( (string) => 0, (int) => 0)(alg);
}

Error: pure function test cannot call impure function 
test.visit!(VariantN!(16LU, int, string)).visit
```

Thank you


More information about the Digitalmars-d-learn mailing list