Section: 188.8.131.52 [map.access] Status: C++11 Submitter: Matt Austern Opened: 2010-11-01 Last modified: 2016-01-28 10:19:27 UTC
Priority: Not Prioritized
View all other issues in [map.access].
View all issues with C++11 status.
In [map.access]/9, the Returns clause for map<Key, T>::at(x) says that it returns "a reference to the element whose key is equivalent to x." That can't be right. The signature for at() says that its return type is T, but the elements of map<Key, T> have type pair<const K, T>. (I checked [unord.map.elem] and found that its specification of at() is correct. This is a problem for map only.)
Change the wording in [map.access]/9 so it's identical to what we already say for operator, which is unambiguous and correct.
Returns: A reference to the
element whose key is equivalentto x.