logoalt Hacker News

nemetroidlast Monday at 3:14 PM1 replyview on HN

Close, it is a std::pair, but it differs in constness. Iterating a std::map<K, V> yields std::pair<const K, V>, so you have:

  std::pair<const std::string, int>
vs

  std::pair<std::string, int>

Replies

1718627440last Monday at 3:28 PM

And what does casting const change, that would involve runtime inefficiencies?

show 2 replies