#8412 closed Bugs (fixed)
stable_vector::back() is broken in Boost 1.53
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | container |
Version: | Boost 1.53.0 | Severity: | Regression |
Keywords: | Cc: |
Description
Tested on both VS2010 and VS2012, boost 1.53, with default boost no option set:
#include <boost/container/stable_vector.hpp> #include <iostream> int main() { boost::container::stable_vector< int > values; values.emplace_back( 42 ); int& bad_value = values.back(); // bad address int& good_value = values.front(); int& also_good_value = values.at(0); // imply values[0] std::cout<< " ADDRESS OF BAD VALUE : " << &bad_value << std::endl; std::cout<< " ADDRESS OF GOOD VALUE : " << &good_value << std::endl; std::cout<< " ADDRESS OF ALSO GOOD VALUE : " << &also_good_value << std::endl; }
This code displays addresses of the bad_value object very low on Debug and very high on Release. I believe that .back() is broken. However, when I test on LiveWorkspace (link removed for spam checks) it seems to work with any available compiler.
So either it's LiveWorkspace which use an older boost version, or this issue arise only on VC.
Change History (4)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for the report. The test case passes ok in MSVC 7.1 & MSVC 10.0 with trunk code so I'm closing it.
comment:3 by , 10 years ago
Note that someone reported on the mailing list reported:
"I can still reproduce the bug using VS2012 Nov CTP with Boost trunk at revision 83791."
I can't test myself with trunk at the moment to confirm this unfortunately.
comment:4 by , 10 years ago
The issue on VS2012 seems to be a Boost configuration issue this seems definitely fixed.
confirmed for 1.53, but this is already fixed in trunk