
29 Dec
2010
29 Dec
'10
5:43 a.m.
At Tue, 28 Dec 2010 22:21:20 -0500, Frank Mori Hess wrote:
On Tuesday 28 December 2010, Dave Abrahams wrote:
Yeah, an allocator with some internal storage that falls back to the heap when it's exausted would allow std::vector's to essentially use the "small string optimization."
It would have to rely on c++0x or implementation-defined behaviour though, as c++03 containers are explicitly not required to support stateful allocators.
Ah, yes; the famous "weasel wording." But AFAIK all real implementations go at least a few steps beyond what's required in that department, as a matter of QOI. -- Dave Abrahams BoostPro Computing http://www.boostpro.com