I'd say it's legal.
The type is assignable, however there is a constraint on using the
assignment operator (and any other method/operator modifying its
content).
To insert a new item in such a map you can always do:
q.insert( std::pair<int, const int>(3, 5) );
but
q[ 3 ] = 5;
is not allowed
My understanding is that 23.1.4 (Table 2) has the following requirements:
Table 2--Assignable requirements
+------------------------------------------------+
|expression return type post-condition |
+------------------------------------------------+
|t = u T& t is equivalent to u |
+------------------------------------------------+
How does that make a const type assignable for the purposes of map?
- Garrett