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)
Change History (5)
by , 15 years ago
| Attachment: | base.hpp.patch added |
|---|
comment:1 by , 15 years ago
| Summary: | copy constructor not copy capacity → copy constructor does not copy capacity |
|---|
comment:2 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 14 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
this problem is still encountered in boost 1.35.
Note:
See TracTickets
for help on using tickets.

patch