On 08/23/2016 06:06 AM, cy wrote:
On Sunday, 21 August 2016 at 21:18:11 UTC, ag0aep6g wrote:

I may be missing the point here, but just putting `auto pattern =
regex("foobar");` at module level works for me.

Really? I thought global variables could only be initialized with static
stuff available during compile time, and you needed a "static this() {}"
block to initialize them otherwise.

That's true, and apparently `regex("foobar")` can be evaluated at compile time.

Reply via email to