
18 Apr
2013
18 Apr
'13
2:45 p.m.
On 18 April 2013 15:36, Antony Polukhin
2013/4/18 Olaf Peter
: Hi,
the attached example confuses me, I've got:
$ g++ -Wall boost_container_bug.cpp -o boost_container_bug && ./boost_container_bug (size=4 [1, 2, 3, 4, 0, 4])
On MSVC11 with boost 1.53 outputs: (size=4 [1, 2, 3, 4])
What version of boost are you using?
The bug is in trunk. See the definition of operator- in: https://svn.boost.org/trac/boost/changeset/83126/trunk/boost/container/vecto... Should be trivial to fix. A workaround is to use "end() + (-1)" instead of "end() - 1".