void test(X const& x, unsigned int allocations = 0) const { if(!(x.size() == values_.size() && test::equal(x.cbegin(), x.cend(), values_.begin(), test::equivalent))) BOOST_ERROR("Strong exception safety failure."); if(allocations != allocations_) BOOST_ERROR("Strong exception failure: extra allocations."); }
void test(X const& x) const { if(!(x.size() == values_.size() && std::equal(x.cbegin(), x.cend(), values_.begin(), test::equivalent))) BOOST_ERROR("Strong exception safety failure."); }
void store(X const& x) { DISABLE_EXCEPTIONS; values_.clear(); values_.insert(x.cbegin(), x.cend()); }
void store(X const& x, unsigned int allocations = 0) { DISABLE_EXCEPTIONS; values_.clear(); values_.insert(x.cbegin(), x.cend()); allocations_ = allocations; }