Ticket #5127 (closed Patches: fixed)
Incorrect result_of usage in transform_iterator
|Reported by:||mimomorin@…||Owned by:||dave|
|Version:||Boost Development Trunk||Severity:||Problem|
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
- The dereference operator of transform_iterator is a const member function.
- 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.
- Milestone changed from To Be Determined to Boost 1.47.0
- Summary changed from Documentation of transform_iterator is incorrect to Incorrect result_of usage in transform_iterator
- Status changed from new to closed
- Resolution set to fixed