[Boost-bugs] [Boost C++ Libraries] #8412: stable_vector::back() is broken in Boost 1.53

Subject: [Boost-bugs] [Boost C++ Libraries] #8412: stable_vector::back() is broken in Boost 1.53
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-06 23:52:02


#8412: stable_vector::back() is broken in Boost 1.53
-------------------------------+--------------------------------------------
 Reporter: mjklaim@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.53.0 | Severity: Regression
 Keywords: |
-------------------------------+--------------------------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8412>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC