Boost logo

Boost :

Subject: Re: [boost] [iterators] Missing typedefs in v1.57
From: (boost57_at_[hidden])
Date: 2014-12-09 15:08:33

Class iterator_facade has been refactored in v1.57 such that most of its
functionality is now in iterator_facade_base. This includes the typedefs
for difference_type and reference. Hence, my classes which are derived from
iterator_facade now have to declare them. For example:

template <typename Stream, typename Value>
class char_iter
    : public boost::iterators::iterator_facade< char_iter<Stream, Value>,
                                                Value, Size >
    typedef typename iterator_facade_::difference_type difference_type;
    typedef typename iterator_facade_::reference reference;

Have I misunderstood how to do this?

"Andrey Semashev" wrote in message news:1528031.YEdZPUoJ70_at_lastique-pc...

On Tuesday 09 December 2014 10:43:11 wrote:
> I posted this a week ago in the user mailing list but it went unnoticed.
> Perhaps this developers' list is a better place to post it.
> The typedefs for difference_type and reference used to be in scope for
> classes derived from iterator_facade. Since v1.57 they have to be
> declared
> thus:
> typedef typename iterator_facade_::difference_type difference_type;
> typedef typename iterator_facade_::reference reference;
> This seems out of place for a class that was designed to reduce boiler
> plate
> code. However, if the change was intentional, please document it.

I'm not sure what you mean. The typedefs are in the base class of
iterator_facade and are public. As such they are accessible to the derived
classes. Can you elaborate what the problem is?

Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at