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:
Attachments (2)
Change History (5)
by , 14 years ago
Attachment: | iterator_facade.diff added |
---|
comment:1 by , 14 years ago
Type: | Support Requests → Patches |
---|
comment:2 by , 12 years ago
Owner: | changed from | to
---|
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 , 12 years ago
Attachment: | boost-changes.diff added |
---|
comment:3 by , 10 years ago
Owner: | changed from | to
---|
A straight forward solution that considers Sebastian Redls concerns is to never return the Reference type.
Patch attached.