#undef NDEBUG #include #include int main() { boost::log::attribute_set set; for (auto ch='A'; ch <= 'z'; ++ch) { auto const key(std::string("key") + ch); auto const res(set.insert(key, boost::log::attributes::make_constant(5))); assert(res.second); // insertion succeeded assert(set.find(res.first->first) != set.end()); // and so did find for (auto const item : set) { // But this starts to fail once every bucket in the set has an item. assert(set.find(item.first) != set.end()); } } return 0; }