You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return type from the subscript operator is not mapped_type. It is mapped_type&, which is what allows an expression like ++word_count[word] to increment the mapped value of the element within the map instead of only incrementing a temporary copy of it.
The text was updated successfully, but these errors were encountered:
xjay73
changed the title
11.26: Return type is a incorrect
11.26: Return type is a reference
Jul 11, 2021
The return type from the subscript operator is not
mapped_type
. It ismapped_type&
, which is what allows an expression like++word_count[word]
to increment the mapped value of the element within the map instead of only incrementing a temporary copy of it.The text was updated successfully, but these errors were encountered: