21 Sep
2009
21 Sep
'09
4:50 p.m.
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.