Problems with ctRegex
Basile B.
b2.temp at gmx.com
Thu Nov 30 10:02:25 UTC 2017
On Tuesday, 28 November 2017 at 19:12:29 UTC, crimaniak wrote:
> First problem: it doesn't understand enums, it seems to be a
> bug:
or just "to!string(TopicMask.publishMask)" would have worked too.
> [...]
> Is there any change to use regex inside or pure function? I
> just need some pure bool test() method to test string against
> the mask.
I don't think so, the factory system has static mutable data,
lazily initialized, so purity seems impossible. If you put "pure"
everywhere in the call chain you will land here:
https://github.com/dlang/phobos/blob/ad489989ec3fac9f65f4bb9d43d2254a0b718dc7/std/regex/internal/ir.d#L521-L522
More information about the Digitalmars-d-learn
mailing list