私はstd::unordered_mapを持っています
std::unordered_map<std::string, std::string> myMap;
findを使用して定数イテレータを取得したい。c++03では
std::unordered_map<std::string, std::string>::const_iterator = myMap.find("SomeValue");
c ++ 11では、代わりにautoを使用してテンプレートを削減したいと思います
auto = myMap.find("SomeValue");
これはconst_iteratorまたはイテレータになりますか?コンパイラはどちらを使用するかをどのように決定しますか?constを選択するように強制する方法はありますか?