
Frank Mori Hess <frank.hess <at> nist.gov> writes:
operator[] on maps can modify the map. Maybe you want to use find() instead?
Hi Frank, I'll try it later, thanks for your answer, Is there any difference of performance between using operator[] and .find()? especially in frequently finding key/value of pair<string, string> in boost::unordered_map<pair<string, string>, boost::unordered_set<int> >. and another question is, could I use container in container such as what I wrote(unordered_set as value in unorder_map)? is this kind of structur undefine-behaviour or it's acceptable? if it's acceptable, did this kind of structure will cause decrasing of performance or won't? if it will, what kind of instead structure could I use to satisfy what I need to do? Thank you