mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fixed code which incorrectly assumed that an iterator returned by begin() is
always a modifiable lvalue. [SVN r40403]
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user