Boost logo

Boost Users :

Subject: Re: [Boost-users] What ever happened to Boost.AutoBuffer?
From: David P. Riedel (driedel_at_[hidden])
Date: 2013-05-03 09:33:48


On 05/02/2013 07:52 PM, John M. Dlugosz wrote:
> I recall some "detail" code in Boost that does exactly what I want:
> allocate a probably-good-enough size on the stack but switch to heap if
> needed. But I can't remember where I saw it.
>
> Looking around, I came across mentions of Boost.AutoBuffer by Thorsten
> Ottosen, but all links are dead.

I think the loki smallstringOpt class will do what you want to do. It
initially allocates storage on the stack but if the string grows beyond
the initial allocation it switches to heap storage.

Dave Riedel


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net