inverse of std.demangle?

Sean Kelly sean at invisibleduck.org
Thu Jul 11 10:06:43 PDT 2013


On Jul 11, 2013, at 9:56 AM, Adam D. Ruppe <destructionator at gmail.com> 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.


More information about the Digitalmars-d-learn mailing list