void test_symmetry(const Symmetry& s) { std::map<int, Symmetry::const_iterator> m; for (Symmetry::const_iterator i = s.begin(); i != s.end(); ++i) { for (unsigned int j = 0; j < 81; ++j) { if ((*i)[j]) { std::pair<std::map<int, Symmetry::const_iterator>::iterator, bool> result = m.insert(std::make_pair(j, i)); assert(result.second); } } } for (unsigned int j = 0; j < 81; ++j) { std::map<int, Symmetry::const_iterator>::iterator it = m.find(j); assert(it != m.end()); } }