On Thursday, 12 October 2017 at 08:08:17 UTC, Igor wrote:
I tried this but Disassembly view shows:
call std.regex.regex!string.regex
and
call std.regex.replaceAll!(string, char,
std.regex.internal.ir.Regex!char).replaceAll
which means that replaceAll with regex is done at runtime, not
compile time. Also when I just added enum in front of string
variable then I got this:
Error: malloc cannot be interpreted at compile time, because it
has no available source code
Hmm, you're right. I could've sworn that std.regex is
CTFE-friendly but it looks like I was wrong. If it used the GC
instead of malloc this would probably work.