假设我有例如a std::unordered_map<K,std::set<int>> table.在循环:
std::unordered_map<K,std::set<int>> table
for(auto it = table[k].begin(); it != table[k].end(); ++it){}
是否会在每次迭代时调用K的哈希运算符()?编译器g++带有标志:-m64 -g -std=c++11 -O3
g++
-m64 -g -std=c++11 -O3
c++ unordered-map c++11
c++ ×1
c++11 ×1
unordered-map ×1