Modify

Ticket #1852 (closed Bugs: wontfix)

Opened 6 years ago

Last modified 6 years ago

copy constructor does not copy capacity

Reported by: srajko Owned by: jano_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

base.hpp.patch Download (992 bytes) - added by srajko 6 years ago.
patch

Change History

Changed 6 years ago by srajko

patch

comment:1 Changed 6 years ago by srajko

  • Summary changed from copy constructor not copy capacity to copy constructor does not copy capacity

comment:2 Changed 6 years ago by jano_gaspar

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 6 years ago by dthompson@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

this problem is still encountered in boost 1.35.

comment:4 Changed 6 years ago by jano_gaspar

  • Status changed from reopened to closed
  • Resolution set to wontfix

will not fix for 1.35

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.