Boost logo

Boost :

From: Jan Gaspar (jano_gaspar_at_[hidden])
Date: 2008-05-15 07:48:45


This was an intended behaviour (to allocate the maximum capacity). The reason behind this was to comply with other STL containers. I admin the decision was not the best one. I will change this as you propose but in the Boost version 1.36. For now just use the constructor with the explicit capacity paramater or override the allocator's max_size() to return some sensible value. Jan ----- Original Message ---- From: Dean Michael Berris <mikhailberis_at_[hidden]> To: "boost_at_[hidden]" <boost_at_[hidden]> Sent: Thursday, 15 May, 2008 1:17:27 PM Subject: [boost] [circular_buffer] default constructor usually throws std::bad_alloc I've attached a trivial patch to circular buffer which should allow it to be default constructed (and copy from an existing buffer) without making the default constructor cause an insane request to allocate a huge amount of memory (and fail to throw an std::bad_alloc). I personally think this is a show stopper bug in Boost 1.35.0 and the patch is distributed under the Boost C++ License Version 1.0. Should this be applied to be made part of 1.35.1? -- Dean Michael C. Berris Software Engineer, Friendster, Inc. [http://blog.cplusplus-soup.com] [mikhailberis_at_[hidden]] [+63 928 7291459] [+1 408 4049523] __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk