Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::proto user guide - compile error creating a lazy function
From: Tom Babbin (ctb070_at_[hidden])
Date: 2009-09-21 12:50:42


>
> The problem is that proto::eval() takes its first argument by non-const
> reference. The temporary expression returned by pow1 doesn't bind to it
> as it's defined in the users' guide. Adding a const-qualification to the
> return type solves the problem.
>
> I'll update the docs for 1.41. Thanks for the report.
>

Hi, Eric,

Thanks for the quick response. Adding a const does fix the problem. However, I
am relatively new to meta programming. How come a const expression binds to the
first argument of eval, while a non-const does not?

Thanks again.


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