inline void prepare_insert_range( TestVector& vec, EH_STD::size_t, TestClass* first, TestClass* last ) { if ( random_number(2) ) { EH_STD::ptrdiff_t d = 0; EH_DISTANCE( first, last, d ); vec.reserve( vec.size() + d ); } }
void foo(TestVector a) { barfo = a.size(); // Do something so foo wont be optimized out. }
void prepare_insert_n( TestVector& c, EH_STD::size_t insCnt ) { if ( random_number(2) ) c.reserve( c.size() + insCnt ); }