Subject: [Boost-bugs] [Boost C++ Libraries] #5127: Documentation of transform_iterator is incorrect
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-27 00:59:24
#5127: Documentation of transform_iterator is incorrect
-------------------------------------+--------------------------------------
Reporter: mimomorin@⦠| Owner: dave
Type: Patches | Status: new
Milestone: To Be Determined | Component: iterator
Version: Boost Development Trunk | Severity: Problem
Keywords: transform_iterator |
-------------------------------------+--------------------------------------
The documentation of `transform_iterator` says that
`boost::result_of<UnaryFunction(Iterator::reference)>` is used to
determine the functor return type.
But this is incorrect; the correct one is `boost::result_of<const
UnaryFunction(Iterator::reference)>`.
This is because
1. The dereference operator of `transform_iterator` is a const member
function.
2. So, in the dereference operator, `UnaryFunction` is treated as a
const object.
Accordingly, the code and the test need to be changed too.
I will attach patches for the code, the test and the documentation.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5127> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC