示例#1
0
 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.");
 }
示例#2
0
 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.");
 }
示例#3
0
 void store(X const& x) {
     DISABLE_EXCEPTIONS;
     values_.clear();
     values_.insert(x.cbegin(), x.cend());
 }
示例#4
0
 void store(X const& x, unsigned int allocations = 0) {
     DISABLE_EXCEPTIONS;
     values_.clear();
     values_.insert(x.cbegin(), x.cend());
     allocations_ = allocations;
 }