const char *const shMemName = test::get_process_id_name();
const int max = 100;
- try{
+ BOOST_TRY{
//Create shared memory
shared_memory_object::remove(shMemName);
ManagedSharedMemory segment(create_only, shMemName, memsize);
}
{
//This is really nasty, but we have no other simple choice
- IntPairType aux_vect[max];
+ IntPairType aux_vect[std::size_t(max)];
for(int i = 0; i < max; ++i){
IntType i1(i);
IntType i2(i);
new(&aux_vect[i])IntPairType(boost::move(i1), boost::move(i2));
}
- IntPairType aux_vect3[max];
+ IntPairType aux_vect3[std::size_t(max)];
for(int i = 0; i < max; ++i){
IntType i1(i);
IntType i2(i);
{
//This is really nasty, but we have no other simple choice
- IntPairType aux_vect[max];
+ IntPairType aux_vect[std::size_t(max)];
for(int i = 0; i < max; ++i){
IntType i1(i);
IntType i2(i);
new(&aux_vect[i])IntPairType(boost::move(i1), boost::move(i2));
}
- IntPairType aux_vect3[max];
+ IntPairType aux_vect3[std::size_t(max)];
for(int i = 0; i < max; ++i){
IntType i1(i);
IntType i2(i);
shmmap->clear();
shmmultimap->clear();
+ typedef typename MyShmMultiMap::size_type map_size_type;
+
for(int j = 0; j < 3; ++j)
for(int i = 0; i < 100; ++i){
IntPairType intpair;
new(&intpair)IntPairType(boost::move(i1), boost::move(i2));
}
shmmultimap->insert(boost::move(intpair));
- if(shmmap->count(IntType(i)) != typename MyShmMultiMap::size_type(1))
+ if(shmmap->count(IntType(i)) != map_size_type(1u))
return 1;
- if(shmmultimap->count(IntType(i)) != typename MyShmMultiMap::size_type(j+1))
+ if(shmmultimap->count(IntType(i)) != map_size_type(j)+1u)
return 1;
}
}
if(!segment.all_memory_deallocated())
return 1;
}
- catch(...){
+ BOOST_CATCH(...){
shared_memory_object::remove(shMemName);
- throw;
- }
+ BOOST_RETHROW
+ } BOOST_CATCH_END
shared_memory_object::remove(shMemName);
return 0;
}
const char *const shMemName = test::get_process_id_name();
const int max = 100;
- try{
+ BOOST_TRY{
//Create shared memory
shared_memory_object::remove(shMemName);
ManagedSharedMemory segment(create_only, shMemName, memsize);
if(!segment.all_memory_deallocated())
return 1;
}
- catch(...){
+ BOOST_CATCH(...){
shared_memory_object::remove(shMemName);
- throw;
- }
+ BOOST_RETHROW
+ } BOOST_CATCH_END
shared_memory_object::remove(shMemName);
return 0;
}