例子:
typedef boost::unordered_map<int, int> UserOnlineMap;
UserOnlineMap userOnlineMap_;
std::pair<UserOnlineMap::iterator, bool> res = userOnlineMap_insert(std::make_pair(xxx, xxx));
if (!res.second)
{
std::cout << "insert failed" <<std::endl;
userOnlineMap_[xxx] = xxx;
}