
Dear all, I have an instance of boost::unordered_map<> somewhere in my codebase (GCC 4.5.1, MinGW, WinXP) with the following funny piece of test code: container_[id].insert(v); cout << "container insertion succesful" << endl; cout << "The container now contains " << container_.size() << " ids in it." << endl; cout << "distance from begin to end = " << distance(container_.begin(), container_.end()) << endl; Strangely enough, it happens sometimes that the output I get is: container insertion succesful The container now contains 2 ids in it. distance from begin to end = 1 I.e., size() != distance(begin(), end()) which is against the documentation: http://www.boost.org/doc/libs/1_44_0/doc/html/boost/unordered_map.html#id134... Am I missing anything? Or, is this a bug in the implementation of boost::unordered_map<>? TIA, --Hossein