This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.
Section: 21.4.4 [map] Status: NAD Editorial Submitter: Mark Mitchell Opened: 1999-04-14 Last modified: 2016-12-23
Priority: Not Prioritized
View all other issues in [map].
View all issues with NAD Editorial status.
expression return type pre/post-condition
------------- ----------- -------------------
X::value_type T T is assignable
A map satisfies all the requirements of a container.
For a map<Key, T> ... the value_type is pair<const Key, T>.
There's a contradiction here. In particular, `pair<const Key, T>' is not assignable; the `const Key' cannot be assigned to. So, map<Key, T>::value_type does not satisfy the assignable requirement imposed by a container.
[See issue 103 for the slightly related issue of modification of set keys.]
The LWG believes that the standard is inconsistent, but that this is a design problem rather than a strict defect. May wish to reconsider for the next standard.