Boost logo

Boost Users :

Subject: [Boost-users] [boost][iterator] Regarding Ticket #11847
From: Gagan Kumar (gagan1kumar_at_[hidden])
Date: 2015-12-23 05:10:01


Hi,
I am new and I wanted to contribute.
The ticker #11847 says,"reference typedef no longer available in parent class of iterator_facade" but actually I think reference is available in class iterator_facade itself(boost/iterator/iterator_facade.hpp).

But still we are not able to use reference in class simple_iterator : public boost::iterator_facade<simple_iterator<T>, T, boost::forward_traversal_tag>
and then after a while I saw this http://stackoverflow.com/questions/1643035/propagating-typedef-from-based-to-derived-class-for-template

>From my side I can only solve this kind of problem by

   using typename boost::iterators::iterator_facade<simple_iterator<T>, T, boost::iterators::forward_traversal_tag>::reference;
 
or using alternative of reference as

   T& dereference() const { return *m_iter; } //T& instead of reference,  as stated in Ticket

Can somebody please tell me or guide me to a better way to solve this problem.

Regards
Gagan Kumar
 


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net