
28 Apr
2010
28 Apr
'10
4:46 p.m.
I am experimenting with the calculator example presented in the proto docs. I am unable to use pow<> when I define it using the make_expr (as preseneted in docs), but when I define it like proto::terminal< struct pow_fun<2> >::type const pow2 = {{}}; it works. I am using it like that in the main calculator_context ctx; ctx.args.push_back(2.0); std::cout << proto::eval( pow2(_1), ctx ) << std::endl; // ok with terminal std::cout << proto::eval( pow2(3.0), ctx ) << std::endl; // ok with terminal How can I make the make_expr version to work? Thanks in anticipation Noman Javed Orléans, France