
Sergey, I tried your code but it fails on me when using Visual Studio 9. It creates 18 errors. Here is a snippet: 1>c:\boost\boost\spirit\home\phoenix\core\detail\function_eval.hpp(40) : error C2825: 'boost::phoenix::detail::function_eval<0>::result<Env,F>::fn': must be a class or namespace when followed by '::' 1> with 1> [ 1> Env=boost::phoenix::basic_environment<>, 1> F=boost::phoenix::value<double point::* > 1> ] 1> c:\boost\boost\spirit\home\phoenix\core\detail\composite_eval.hpp(88) : see reference to class template instantiation 'boost::phoenix::detail::function_eval<0>::result<Env,F>' being compiled 1> with 1> [ 1> Env=boost::phoenix::basic_environment<>, 1> F=boost::phoenix::value<double point::* > 1> ] 1> c:\boost\boost\spirit\home\phoenix\core\composite.hpp(64) : see reference to class template instantiation 'boost::phoenix::detail::composite_eval<1>::result<Composite,Env>' being compiled 1> with 1> [ 1> Composite=boost::phoenix::composite<boost::phoenix::detail::function_eval<0>,boost::fusion::vector<boost::phoenix::value<double point::* >,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_>>, 1> Env=boost::phoenix::basic_environment<> 1> ] 1> c:\boost\boost\spirit\home\phoenix\core\actor.hpp(57) : see reference to class template instantiation 'boost::phoenix::composite<EvalPolicy,EvalTuple>::result<Env>' being compiled 1> with 1> [ 1> EvalPolicy=boost::phoenix::detail::function_eval<0>, 1> EvalTuple=boost::fusion::vector<boost::phoenix::value<double point::* >,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_>, 1> Env=boost::phoenix::basic_environment<> 1> ] 1> c:\boost\boost\mpl\eval_if.hpp(41) : see reference to class template instantiation 'boost::phoenix::eval_result<Eval,Env>' being compiled 1> with 1> [ 1> Eval=boost::phoenix::composite<boost::phoenix::detail::function_eval<0>,boost::fusion::vector<boost::phoenix::value<double point::* >,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_>>, 1> Env=boost::phoenix::basic_environment<> 1> ] [snip] Thanks, Christian On Sat, Nov 1, 2008 at 5:52 AM, Sergey Sadovnikov <flex_ferrum@artberg.ru> wrote:
Hello, Christian.
Saturday, November 1, 2008 at 1:15:54 AM you wrote:
CH> Hi there, the following snippet doesn't compile which surprises me a CH> little. Could somebody tell what's wrong?
Try following: double sum_prob = std::accumulate( d.begin() , d.end() , 0.0 , bind( &point::_prob)(arg1) );
-- Best Regards, Sergey
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users