How do you deal with scoped allocations?

Namespace rswhite4 at googlemail.com
Sat Dec 7 16:11:17 PST 2013


On Sunday, 8 December 2013 at 00:05:42 UTC, David Nadlinger wrote:
> On Saturday, 7 December 2013 at 23:26:05 UTC, Namespace wrote:
>> struct Helper(T, uint StackSize = 128) {
>> 	static T[StackSize] buffer = void;
>
> Using a static variable here means that there is only one such 
> buffer per thread (and e.g. it wouldn't be possible to use the 
> helper twice in the same call stack) - is this really what you 
> want?
>
> David

That is not what I want or what I use. But it seems that Adam D. 
Ruppe use such a thing. What would you use?


More information about the Digitalmars-d mailing list