On Jul 11, 2013, at 9:56 AM, Adam D. Ruppe <[email protected]> wrote:
> On Thursday, 11 July 2013 at 16:38:48 UTC, Jacob Carlborg wrote: >> enum string[23] _primitives = [ ... ]; >> static immutable primitives = _primitives; > > Cool, a variant of that did work. Thanks! > > Now it is 100% heap allocation free. Sweet! And to be fair, I'm fine with heap allocation as a failsafe. What's important is that if the user provides a sufficiently large input buffer, then the routine doesn't allocate. That way, the GC and other sensitive parts of the code can use these functions if needed.
