Opened 15 years ago
Closed 12 years ago
#1519 closed Patches (invalid)
lvalue-ness resurrection in transform_iterator
Reported by: | 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)
Change History (2)
by , 15 years ago
Attachment: | lvalue_function.patch added |
---|
comment:1 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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*
.
extracts pure traversal tag