std::map<char,int> dict;
...
auto pmax = dict.begin(); // here i get const iterator
Can I "explicitly indicate" that the value obtained is a non-constant type?
If your dict is not const, begin will return a std::map<char,int>::iterator. Now, the key is const, but the value is not.
auto should give you a std::map<char,int>::iterator; do you have evidence to the contrary?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With