Created on 1999-11-19.00:00:00 last changed 171 months ago
[ Redmond: the LWG thinks this is separable from other constness issues. This issue is just cleanup; it clarifies language that was written before we had iterator_traits. Proposed resolution was modified: the original version only discussed *a. It was pointed out that we also need to worry about *r++ and a->m. ]
[ Tokyo: The LWG believes this is the tip of a larger iceberg; there are multiple const problems with the STL portion of the library and that these should be addressed as a single package. Note that issue 180 has already been declared NAD Future for that very reason. ]
Proposed resolution:
In table 74, in the *a and *r++ rows, change the return type from "T&" to "T& if X is mutable, otherwise const T&". In the a->m row, change the return type from "U&" to "U& if X is mutable, otherwise const U&".
In table 74, the return type of the expression *a is given as T&, where T is the iterator's value type. For constant iterators, however, this is wrong. ("Value type" is never defined very precisely, but it is clear that the value type of, say, std::list<int>::const_iterator is supposed to be int, not const int.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg1837 |
2010-10-21 18:28:33 | admin | set | messages: + msg1836 |
2010-10-21 18:28:33 | admin | set | messages: + msg1835 |
1999-11-19 00:00:00 | admin | create |