Boost logo

Boost Users :

Subject: Re: [Boost-users] [proto] [fusion] Problem using BOOST_PROTO_AUTO
From: Eric Niebler (eric_at_[hidden])
Date: 2010-02-23 03:44:30


On 2/22/2010 6:12 PM, Manjunath Kudlur wrote:
> I have the following program to print out the arguments of a function
> call expression. It works fine when I directly call the grammar on the
> expression like so : foo_tostr()(f(a,b,c)). However, if I assign the
> expression to a variable pr using BOOST_PROTO_AUTO and call
> foo_tostr()(pr), I get error of the form "conversion from
> ‘boost::fusion::... to non-scalar type .... requested". Can someone
> let me know what I am doing wrong?

<snip>

You're not doing anything wrong. You've uncovered a couple of
const-correctness issues in proto and fusion. The big issue is that some
fusion algorithms (e.g. fusion::pop_front, fusion::reverse) are not
overloaded on const and non-const arguments. I've filed a bug against
fusion and worked around the problem in proto.

You can track the issue here:
https://svn.boost.org/trac/boost/ticket/3954

-- 
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