Opened 15 years ago

Closed 14 years ago

#1852 closed Bugs (wontfix)

copy constructor does not copy capacity

Reported by: Stjepan Rajko Owned by: Jan Gaspar
Milestone: To Be Determined Component: circular_buffer
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

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.

Attachments (1)

base.hpp.patch (992 bytes ) - added by Stjepan Rajko 15 years ago.
patch

Download all attachments as: .zip

Change History (5)

by Stjepan Rajko, 15 years ago

Attachment: base.hpp.patch added

patch

comment:1 by Stjepan Rajko, 15 years ago

Summary: copy constructor not copy capacitycopy constructor does not copy capacity

comment:2 by Jan Gaspar, 14 years ago

Resolution: fixed
Status: newclosed

comment:3 by dthompson@…, 14 years ago

Resolution: fixed
Status: closedreopened

this problem is still encountered in boost 1.35.

comment:4 by Jan Gaspar, 14 years ago

Resolution: wontfix
Status: reopenedclosed

will not fix for 1.35

Note: See TracTickets for help on using tickets.