
Hello, I'm wondering what the reference member in the iterator_traits of an iterator is required to be. I couldn't find any requirement at all in the C++98 standard, and more surprisingly, I can't see any requirement in the new iterator proposal either. In particular, operator* does not seem to be required to return the iterator_traits< Iterator >::reference for lvalue iterators. At one point, however, the proposal suggests that this was the intention: "...would have a return type of reference; the same as operator*." where reference has a font style indicating that it's the iterator_traits's notion of reference. I'm looking at the proposal version currently published along in the documentation of the boost iterator library. So my questions: - Am I right in my suspicion that in the STL, the reference iterator_trait is entirely useless if taken strictly? - Should the proposal not better require the reference to match with operator*'s return type for lvalue iterators? If not, what's its use? - Is this off-topic here? :) Regards, Jens