Boost logo

Boost Users :

From: Bill Lear (rael_at_[hidden])
Date: 2007-07-27 17:11:32


On Friday, July 27, 2007 at 22:49:22 (+0200) Ovanes Markarian writes:
>Most of std classes support custom allocators. basic_stringstream and
>vector do this as well. You can preallocate the memory needed and
>create objects in this memory locations. For more help see the
>placement new operator.

Hmm, yes, they do, but they also have a pitfall. If I create a new
templated ostringstream with a custom allocator, it then means that
the string that is returned also must use this custom allocator,
and is incompatible with standard strings. I guess that's not
surprising, however, now that I think about it...

Bill


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