Boost C++ Libraries: Ticket #8412: stable_vector::back() is broken in Boost 1.53 https://svn.boost.org/trac10/ticket/8412 <p> Tested on both VS2010 and VS2012, boost 1.53, with default boost no option set: </p> <pre class="wiki"> #include &lt;boost/container/stable_vector.hpp&gt; #include &lt;iostream&gt; int main() { boost::container::stable_vector&lt; int &gt; values; values.emplace_back( 42 ); int&amp; bad_value = values.back(); // bad address int&amp; good_value = values.front(); int&amp; also_good_value = values.at(0); // imply values[0] std::cout&lt;&lt; " ADDRESS OF BAD VALUE : " &lt;&lt; &amp;bad_value &lt;&lt; std::endl; std::cout&lt;&lt; " ADDRESS OF GOOD VALUE : " &lt;&lt; &amp;good_value &lt;&lt; std::endl; std::cout&lt;&lt; " ADDRESS OF ALSO GOOD VALUE : " &lt;&lt; &amp;also_good_value &lt;&lt; std::endl; } </pre><p> 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 <a class="missing wiki">LiveWorkspace</a> (link removed for spam checks) it seems to work with any available compiler. </p> <p> So either it's <a class="missing wiki">LiveWorkspace</a> which use an older boost version, or this issue arise only on VC. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8412 Trac 1.4.3 anonymous Sun, 07 Apr 2013 01:21:40 GMT <link>https://svn.boost.org/trac10/ticket/8412#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8412#comment:1</guid> <description> <p> confirmed for 1.53, but this is already fixed in trunk </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Sun, 07 Apr 2013 19:08:05 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8412#comment:2 https://svn.boost.org/trac10/ticket/8412#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the report. The test case passes ok in MSVC 7.1 &amp; MSVC 10.0 with trunk code so I'm closing it. </p> Ticket mjklaim@… Sun, 07 Apr 2013 19:27:56 GMT <link>https://svn.boost.org/trac10/ticket/8412#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8412#comment:3</guid> <description> <p> Note that someone reported on the mailing list reported: </p> <blockquote> <p> "I can still reproduce the bug using VS2012 Nov CTP with Boost trunk at revision 83791." </p> </blockquote> <p> I can't test myself with trunk at the moment to confirm this unfortunately. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Mon, 08 Apr 2013 21:21:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8412#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8412#comment:4</guid> <description> <p> The issue on VS2012 seems to be a Boost configuration issue this seems definitely fixed. </p> </description> <category>Ticket</category> </item> </channel> </rss>