Opened 15 years ago

Closed 12 years ago

#1519 closed Patches (invalid)

lvalue-ness resurrection in transform_iterator

Reported by: Shunsuke Sogame <pstade.mb@…> Owned by: Dave Abrahams
Milestone: Boost 1.36.0 Component: iterator
Version: Boost Development Trunk Severity: Problem
Keywords: transform_iterator iterator Cc:

Description

The patch for a function returning lvalue. See: http://lists.boost.org/Archives/boost/2007/12/131439.php

Attachments (1)

lvalue_function.patch (534 bytes ) - added by Shunsuke Sogame <pstade.mb@…> 15 years ago.
extracts pure traversal tag

Download all attachments as: .zip

Change History (2)

by Shunsuke Sogame <pstade.mb@…>, 15 years ago

Attachment: lvalue_function.patch added

extracts pure traversal tag

comment:1 by Dave Abrahams, 12 years ago

Resolution: invalid
Status: newclosed

If I understand correctly what your patch is doing, you are effectively determining whether the resulting transform_iterator<...> satisfies the access requirements of ForwardIterator (and thus, RandomAccessIterator) by looking at the lvalueness of the transformed result_type. Unfortunately, that's not a valid way to make the determination, because the resulting iterator doesn't suddenly become multipass just because of a change in the reference type. In fact, most of the standard's InputIterators return references from their operator*.

Note: See TracTickets for help on using tickets.