cym13 wrote: > I think it's because regex() only compiles the regex at runtime > so it needs to be modified later ;
Aw come on. The immutability of the variable is *after* it has been created at runtime. > > you'll find that using > ctRegex() instead will allow you to declare it immutable for > example. I didn't look at the implementation to identify a > precise cause though. You mean ctRegex!(), but nope: immutable numbers = ctRegex!r"\d+"; or doing const there gives the same error and using auto doesn't. -- Shriramana Sharma, Penguin #395953