Modify

Opened 10 years ago

Closed 9 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 10 years ago.
patch

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by Stjepan Rajko

Attachment: base.hpp.patch added

patch

comment:1 Changed 10 years ago by Stjepan Rajko

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

comment:2 Changed 10 years ago by Jan Gaspar

Resolution: fixed
Status: newclosed

comment:3 Changed 9 years ago by dthompson@…

Resolution: fixed
Status: closedreopened

this problem is still encountered in boost 1.35.

comment:4 Changed 9 years ago by Jan Gaspar

Resolution: wontfix
Status: reopenedclosed

will not fix for 1.35

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jan Gaspar.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.