Opened 14 years ago

Last modified 10 years ago

#1947 new Patches

traversal access decoupling

Reported by: Roland Schwarz Owned by: jeffrey.hellrung
Milestone: Boost 1.36.0 Component: iterator
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc: roland.schwarz@…

Description

In an attempt to use iterator_facade to implement a "Readable" and "Writeable"

"Swapable" "Random Access" iterator

I found that the expression: it[n] returns an object of type operator_brackets_proxy that is convert- ible to "reference" but not to "value_type".

Consequently I can use

value_type a; it[n] = a;

but not a = it[n];

I am not sure of how to correctly solve this issue. Here is a pointer to a discussion on the list:

http://lists.boost.org/Archives/boost/2008/05/137868.php

Attachments (2)

iterator_facade.diff (482 bytes ) - added by Roland Schwarz 14 years ago.
boost-changes.diff (10.2 KB ) - added by Dave Abrahams 12 years ago.

Download all attachments as: .zip

Change History (5)

by Roland Schwarz, 14 years ago

Attachment: iterator_facade.diff added

comment:1 by Roland Schwarz, 14 years ago

Type: Support RequestsPatches

A straight forward solution that considers Sebastian Redls concerns is to never return the Reference type.

Patch attached.

comment:2 by Dave Abrahams, 12 years ago

Owner: changed from Dave Abrahams to Thomas Witt

The hard part was making tests that would detect the absence of your fix. Unfortunately, I ran out of time to commit this and run it through the test/release-branch-merge cycle. My patch is attached. Reassigning to Thomas in hopes he has time for that.

by Dave Abrahams, 12 years ago

Attachment: boost-changes.diff added

comment:3 by Dave Abrahams, 10 years ago

Owner: changed from Thomas Witt to jeffrey.hellrung
Note: See TracTickets for help on using tickets.