id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 1019,iterator_facade::pointer should be the return type of operator-> (DR 445),Niels Dekker,Dave Abrahams,"The definition of iterator_facade does not agree with the resolution of Standard Library Defect Report 445, submitted by David Abrahams, 2003-12-09. [[BR]] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#445 DR 445 is resolved within the current Draft of the Standard, as follows (Iterator traits, section 24.3.1):[[BR]] '' iterator_traits::reference '' [[BR]] '' iterator_traits::pointer '' [[BR]] ''shall be defined as the iterator’s reference and pointer types, that is, for an iterator object a, the same type as the type of *a and a->, respectively.'' [[BR]] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2135.pdf On the other hand, iterator_facade::pointer is a raw pointer, while iterator_facade::operator->() returns operator_arrow_result::type, which may be a proxy. To conform to the resolution of DR 445, iterator_facade::pointer should be defined as the return type of operator->(), e.g. (assuming that ''raw_pointer'' is the original raw pointer to the value_type): {{{ typedef typename operator_arrow_result< value_type , reference , raw_pointer >::type pointer; }}} More discussion about this issue: comp.lang.c++.moderated, Sep 29 2005 [[BR]] Re: iterator dereference requirements [[BR]] http://groups.google.com/group/comp.lang.c++.moderated/msg/0f332bcd9a911526 comp.std.c++, March/April 2007 [[BR]] What should std::InputIterator::pointer be? [n2193 / n2083] [[BR]] http://groups.google.com/groups/search?q=%22What+should+std%3A%3AInputIterator%3CT%3E%3A%3Apointer+be%3F%22 comp.std.c++, May 2007 [[BR]] Testing new iterator concepts with ConceptGCC [[BR]] http://groups.google.com/group/comp.std.c++/tree/browse_frm/thread/9c40ffc2f6394ca0/590e75dfbb993cf6 [I had some e-mail discussion with David Abrahams on this issue as well.]",Bugs,closed,Boost 1.36.0,iterator,Boost 1.34.0,Problem,fixed,,