|
Boost Users : |
Subject: Re: [Boost-users] [Proto] lazy transform is not working
From: Eric Niebler (eric_at_[hidden])
Date: 2009-04-03 17:09:43
Dave Jenkins wrote:
>> A bug. It's fixed now on the trunk and release branches. Thanks.
>
> Thank you, Eric. That works, but now proto::lazy isn't working with
> proto::fold.
>
> Below is a program you posted to boost.devel on 3/29/2008, updated with
> s/bind/lazy/ and s/_arg/_child/. It's giving me the following syntax
> error. Any idea what's wrong?
Yes, the new code is actually correct, but it requires you to correctly
handle references in your function object. Just add the following
result<> specializations to the Accumulator<> class template:
template<typename This, typename Value2>
struct result<This(Value2 &)> : result<This(Value2)>
{};
template<typename This, typename Value2>
struct result<This(Value2 const &)> : result<This(Value2)>
{};
With this change, it works for me.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net