Tested on both VS2010 and VS2012,
boost 1.53,
with default boost no option set:
############
#include
#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 there : http://liveworkspace.org/code/3F11CK$2
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.
I made a ticket: https://svn.boost.org/trac/boost/ticket/8412
Joel Lamotte