Subject: [Boost-bugs] [Boost C++ Libraries] #1852: copy constructor not copy capacity
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-24 01:07:08
#1852: copy constructor not copy capacity
-------------------------------------+--------------------------------------
Reporter: srajko | Owner: jano_gaspar
Type: Bugs | Status: new
Milestone: To Be Determined | Component: circular_buffer
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
After looking at the code, the following behavior looks like a bug:
boost::circular_buffer<int> one(3);
boost::circular_buffer<int> two(one);
std::cout<<one.capacity()<<std::endl; // outputs 3
std::cout<<two.capacity()<<std::endl; // outputs 0, I was expecting 3
My best guess at a patch attached.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1852>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC