Marked vector iterator and boost::interprocess::offset_ptr as contiguous storage iterators to speed up insertion in vector with trivially copyable types.

[SVN r83416]
This commit is contained in:
Ion Gaztañaga
2013-03-13 16:14:17 +00:00
parent 6acbbb6f9b
commit ff57d9287e
2 changed files with 67 additions and 0 deletions

View File

@@ -83,6 +83,11 @@ bool vector_copyable_only(V1 *boostvector, V2 *stdvector, boost::container::cont
{
V1 *pv1 = new V1(*boostvector);
V2 *pv2 = new V2(*stdvector);
boostvector->clear();
stdvector->clear();
boostvector->assign(pv1->begin(), pv1->end());
stdvector->assign(pv2->begin(), pv2->end());
if(!test::CheckEqualContainers(boostvector, stdvector)) return 1;
delete pv1;
delete pv2;
}