Result of CTFE should be implicitly castable to immutable

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Oct 11 14:30:54 UTC 2017


My motivation is, of course, std.regex.

static immutable r = regex("abc");

This is perfectly fine but because in general there is some 
amount of impurtiy in regex and it won't work. Yet regex is 
called at CTFE so there is no way it can escape mutable pointer 
to its result.

Thoughts?



More information about the Digitalmars-d mailing list