fusion - reverse_view on maps

Hello, Awhile back I was using fusion.reverse_view on a fusion.map sequence (I think it was ~<=1.37 or thereabouts.) In later upgrades this became broken as a bidirectional concept was enforced on the reverse_view (quite sensible.) To work around this I made a minor change to my version which allowed reverse_view to work on both bidirectional sequences and those meeting the is_associative trait. Anyway, it got me wondering if there is a good reason that the map type doesn't model a bidirectional sequence? Cheers, Brandon

On 10/7/2011 10:43 PM, Brandon Kohn wrote:
Hello,
Awhile back I was using fusion.reverse_view on a fusion.map sequence (I think it was ~<=1.37 or thereabouts.) In later upgrades this became broken as a bidirectional concept was enforced on the reverse_view (quite sensible.) To work around this I made a minor change to my version which allowed reverse_view to work on both bidirectional sequences and those meeting the is_associative trait. Anyway, it got me wondering if there is a good reason that the map type doesn't model a bidirectional sequence?
There's no reason. It might even be random access, after all, it's built on top of vector. I'd very much welcome a patch. Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com

On 10/7/2011 7:35 PM, Joel de Guzman wrote:
There's no reason. It might even be random access, after all, it's built on top of vector. I'd very much welcome a patch.
Ok, what I did as a workaround was quite simple, but perhaps isn't strictly the most correct way. Let me put together a proposed patch and get back to you with that. Cheers, Brandon
participants (2)
-
Brandon Kohn
-
Joel de Guzman