Created on 2000-08-27.00:00:00 last changed 172 months ago
Proposed resolution:
In section 21.3.4, paragraph 1, change "data()[pos]" to "*(begin() + pos)".
Paraphrased from a message that Chris Newton posted to comp.std.c++:
The standard's description of basic_string<>::operator[] seems to violate const correctness.
The standard (21.3.4/1) says that "If pos < size(), returns data()[pos]." The types don't work. The return value of data() is const charT*, but operator[] has a non-const version whose return type is reference.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2035 |
2000-08-27 00:00:00 | admin | create |