[Boost-bugs] [Boost C++ Libraries] #5697: iterator_facade::operator-> is broken for proxy references

Subject: [Boost-bugs] [Boost C++ Libraries] #5697: iterator_facade::operator-> is broken for proxy references
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-14 07:40:54


#5697: iterator_facade::operator-> is broken for proxy references
---------------------------------------------------------------+------------
 Reporter: Jeffrey Hellrung <jeffrey.hellrung@…> | Owner: dave
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iterator
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: iterator_facade, operator->, operator_arrow_proxy |
---------------------------------------------------------------+------------
 For the detailed discussion:

 http://comments.gmane.org/gmane.comp.lib.boost.devel/221041

 Briefly, when using a proxy reference in one's iterator derived from
 iterator_facade, the implementation of operator-> tries to construct a
 value_type const * from the expression &x, where x has (declared) type
 reference. I see no reason why a reference* (a pointer to a proxy
 reference object) could be expected to be a convertible to a value_type
 const *. I believe a correct implementation of operator_arrow_proxy would
 store the proxy reference object, not an object of the value_type. As far
 as I know, this does not violate any iterator requirements.

 I will gladly submit a patch once it is acknowledged that this is, indeed,
 a bug (or before, if requested).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5697>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC