[boost][iterator] Regarding Ticket #11847
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
From my side I can only solve this kind of problem by
using typename boost::iterators::iterator_facade
From: Gagan Kumar Sent: 23 December 2015 10:10
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
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
::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.
Thank you for looking into this. The two solutions that you suggest both are in the user code and do not require a fix in Boost. Based on your findings, I would say that the bug needs to be closed as "won't fix": The regression that the user (me) experienced only occurred because the original code happened to work under a non-conformant compiler.
participants (2)
-
alex
-
Gagan Kumar