|
Boost : |
Subject: [boost] [intrusive] unordered_set insert/find question
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-06-15 04:22:35
hi all,
i am a bit confused about the behavior of boost::intrusive::unordered_set. i can
insert() an object, but i am unable to find() it:
my basic workflow is:
// insert:
map_type * elem = new map_type();
std::pair<iterator, bool> inserted = slot_resolver_map.insert(*elem);
bool success = inserted.second;
assert(success); // object has been inserted correctly
// verify:
iterator this_iterator = inserted.first;
iterator found = slot_resolver_map.find(*elem);
iterator end = slot_resolver_map.end();
assert(this_iterator == found); // fails
assert(found != end); // fails
so basically if i insert an element, i cannot find it anymore ...
i have a reduced test case, which shows this behavior at [1] ... is this my
fault (not using the unordered_set correctly) or is it a bug in boost.intrusive?
thanks, tim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk