Opened 10 years ago

Closed 10 years ago

#8118 closed Bugs (fixed)

stable_vector::back() returns reference to incorrect value

Reported by: alastair@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.52.0 Severity: Regression
Keywords: Cc:

Description

Test case enclosed. The assert goes off because the value returned from last() is 253, when 255 is expected.

Workaround to use *v.rbegin() works fine.

Bug is verified in 1.52.0 and 1.53.0.

Attachments (1)

stable_vector_bug.cpp (282 bytes ) - added by alastair@… 10 years ago.

Download all attachments as: .zip

Change History (3)

by alastair@…, 10 years ago

Attachment: stable_vector_bug.cpp added

comment:1 by Ion Gaztañaga, 10 years ago

Thanks for the report and the test case. It will fix it and optimize a bit size() and capacity() to speed up a bit back().

comment:2 by Ion Gaztañaga, 10 years ago

Resolution: fixed
Status: newclosed

(In [83044]) Fixes #8118

Note: See TracTickets for help on using tickets.