Vote on region allocator

dsimcha dsimcha at yahoo.com
Mon Sep 26 11:46:12 PDT 2011


== Quote from Peter Alexander (peter.alexander.au at gmail.com)'s article
> > T newArray(T, I...)(I sizes);
> >
> > // Usage:
> > auto foo = newArray!(uint[])(5);
> >
> > This would be marginally do-able but very ugly if RTTI were used.
> Ok, now I'm really lost. Where do allocators come into that?

I'm sorry.  To clarify:

SomeAllocator alloc;
auto foo = alloc.newArray!(uint[])(5);

The only way to do this with dynamic allocators would be a final templated
function wrapping a function that takes RTTI.  This would be marginally do-able
but very ugly.


More information about the Digitalmars-d mailing list