iterator_adaptor: underlying iterator type?

Currently 'iterator_adaptor' exposes its underlying iterator _object_ (through 'base()'), but not its type, which stands in the way of a generic code manipilating adapted iterators/sequences, e.g.: template< typename Sequence > mtn::iterator_range< typename Sequence::iterator::base_type > // ^^^^^^^^^^^ // currently unavailable base_view( Sequence& seq ) { return mtn::make_iterator_range( seq.begin().base() , seq.end().base() ); } Any objections if I add the typedef (and update the docs correspondingly)? -- Aleksey Gurtovoy MetaCommunications Engineering

Aleksey Gurtovoy wrote:
Currently 'iterator_adaptor' exposes its underlying iterator _object_ (through 'base()'), but not its type, which stands in the way of a generic code manipilating adapted iterators/sequences, e.g.:
template< typename Sequence > mtn::iterator_range< typename Sequence::iterator::base_type > // ^^^^^^^^^^^ // currently unavailable
It's already there in CVS. I submitted a patch for this, which Dave A. applied months ago. -- Eric Niebler Boost Consulting www.boost-consulting.com

Eric Niebler writes:
Aleksey Gurtovoy wrote:
Currently 'iterator_adaptor' exposes its underlying iterator _object_ (through 'base()'), but not its type, which stands in the way of a generic code manipilating adapted iterators/sequences, e.g.:
template< typename Sequence > mtn::iterator_range< typename Sequence::iterator::base_type > // ^^^^^^^^^^^ // currently unavailable
It's already there in CVS.
Not in the docs, which is wrong. It's not an implementation detail. Would you care to patch the docs accordingly as well? Thanks for the info, -- Aleksey Gurtovoy MetaCommunications Engineering

Aleksey Gurtovoy wrote:
Eric Niebler writes:
It's already there in CVS.
Not in the docs, which is wrong. It's not an implementation detail. Would you care to patch the docs accordingly as well?
It's already in libs/iterator/doc/iterator_adaptor_ref.rst. ??? -- Eric Niebler Boost Consulting www.boost-consulting.com

"Eric Niebler" <eric@boost-consulting.com> wrote in message news:428D86E7.6060603@boost-consulting.com...
Aleksey Gurtovoy wrote:
Eric Niebler writes:
It's already there in CVS.
Not in the docs, which is wrong. It's not an implementation detail. Would you care to patch the docs accordingly as well?
It's already in libs/iterator/doc/iterator_adaptor_ref.rst. ???
Oh, OK. It's not here: http://www.boost-consulting.com/boost/libs/iterator/doc/iterator_adaptor.htm..., which then means that the corresponding HTML wasn't regenerated. David? Thanks, -- Aleksey Gurtovoy MetaCommunications Engineering

"Aleksey Gurtovoy" <agurtovoy@meta-comm.com> writes:
"Eric Niebler" <eric@boost-consulting.com> wrote in message news:428D86E7.6060603@boost-consulting.com...
Aleksey Gurtovoy wrote:
Eric Niebler writes:
It's already there in CVS.
Not in the docs, which is wrong. It's not an implementation detail. Would you care to patch the docs accordingly as well?
It's already in libs/iterator/doc/iterator_adaptor_ref.rst. ???
Oh, OK. It's not here: http://www.boost-consulting.com/boost/libs/iterator/doc/iterator_adaptor.htm..., which then means that the corresponding HTML wasn't regenerated. David?
Should be all better now. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams writes:
Aleksey Gurtovoy wrote: Oh, OK. It's not here: http://www.boost-consulting.com/boost/libs/iterator/doc/iterator_adaptor.htm..., which then means that the corresponding HTML wasn't regenerated. David?
Should be all better now.
It is, thank you! -- Aleksey Gurtovoy MetaCommunications Engineering

Aleksey Gurtovoy <agurtovoy@meta-comm.com> writes:
Currently 'iterator_adaptor' exposes its underlying iterator _object_ (through 'base()'), but not its type, which stands in the way of a generic code manipilating adapted iterators/sequences, e.g.:
template< typename Sequence > mtn::iterator_range< typename Sequence::iterator::base_type > // ^^^^^^^^^^^ // currently unavailable base_view( Sequence& seq ) { return mtn::make_iterator_range( seq.begin().base() , seq.end().base() ); }
Any objections if I add the typedef (and update the docs correspondingly)?
None. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
Aleksey Gurtovoy
-
David Abrahams
-
Eric Niebler