$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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.