On Friday, 27 September 2013 at 14:37:05 UTC, Dmitry Olshansky
wrote:
27-Sep-2013 02:00, JR пишет:
And the answer is - don't use ENUM with ctRegex.
The problem is that ctRegex returns you a pack of
datastructures (=arrays).
Using them with enum makes it behave as if you pasted them as
array literals and these do allocate each time.
TL;DR: use static and/or auto with ctRegex not enum.
That fixed it. Thank you both for your help!
(I was of the notion that that enum merely translate to
compile-time-evaluated constants.)