Fixed code which incorrectly assumed that an iterator returned by begin() is

always a modifiable lvalue.


[SVN r40403]
This commit is contained in:
Markus Schöpflin
2007-10-24 09:02:32 +00:00
parent e883dda350
commit 006586af2d

View File

@@ -32,6 +32,7 @@
#include "dummy_test_allocator.hpp"
#include <string>
#include "get_process_id_name.hpp"
#include <boost/utility.hpp>
using namespace boost::interprocess;
@@ -145,8 +146,8 @@ bool do_test()
typename MyShmVector::iterator it;
typename MyShmVector::const_iterator cit = it;
shmvector->erase(shmvector->begin()++);
stdvector->erase(stdvector->begin()++);
shmvector->erase(boost::next(shmvector->begin()));
stdvector->erase(boost::next(stdvector->begin()));
if(!test::CheckEqualContainers(shmvector, stdvector)) return false;
shmvector->erase(shmvector->begin());