Subject: Re: [boost] [fusion] change on trunk breaking proto
From: Christopher Schmidt (mr.chr.schmidt_at_[hidden])
Date: 2009-12-10 17:20:15
Eric Niebler schrieb:
>> The change in reverse_view.hpp causes fusion::reverse_view to always be
>> a bidirectional access sequence, even if the underlying sequence is a
>> random access one. This is correct behaviour according to the
> What is the motivation for this change? It seems to me that a reversed
> random-access range can and should be random-access as well.
On the one hand, that's correct. On the other hand, the documentation
states that fusion::reverse_view models the bidirectional sequence
concept. The random access intrinsic sequence backend implementation is
also missing for fusion::reverse_view_tag.
BTW, the upcoming C++0x-port of fusion has this issue fixed for all views.
>> The problem in proto is probably caused by a bug in the VC9/VC10
>> compiler. The non-random-access implementation of fusion::detail::fold
>> wrongly causes the compiler to instantiate nested template parameters of
>> the functor.
>> I attached a minimal sample which reproduces this problem.
> You should file a bug with Microsoft and attach the preprocessed source
> code. I can do this if you don't know how.
I will file a bug myself. Thanks for the offer though :)
>> Interestingly, the random-access fold implementation works fine in your
>> particular usecase, whereas my sample reproduces the problem for forward
>> and random access sequences.
>> I also attached a temporary workaround-patch for proto.
> Proto's fold transform should work with any forward fusion sequence, so
> I'm afraid I cannot apply your patch because it may break third-party code.
>> Unfortunately I
>> have no idea of how to "fix" fusion in the first place.
> Is reverting the change to reverse_view and option?
No problem! I will have the change reverted and the documentation
updated by tomorrow.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk