Re: [Boost-docs] transform_iterator does not mention all implemented operators

Subject: Re: [Boost-docs] transform_iterator does not mention all implemented operators
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-26 11:41:57


on Wed Sep 14 2011, Krzysztof Żelechowski <giecrilj-AT-stegny.2a.pl> wrote:

> <URL:
> http://www.boost.org/doc/libs/1_47_0/libs/iterator/doc/transform_iterator.html
>>
>
>>From reading the documentation, it is not clear how operators like operator
> != apply to transform_iterator. The synopsis does not say it inherits from
> anything. For the operators to work, it should inherit from
> iterator_adaptor.
>
> Note that iterator_adaptor is described as derived from iterator_facade, as
> it should be.

No, derivation of transform_iterator from iterator_adaptor is an
implementation detail. The abstract on that page says:

    "The transform iterator adapts an iterator by modifying the
    operator* to apply a function object to the result of dereferencing
    the iterator and returning the result."

The very strong implication is that the operations on the underlying
iterator other than operator* are unmodified.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC