Ok, i now I've corrected my method to:
double evaluate(const vector<double>& win_probabls)
{
return accumulate (win_probabls.begin(), win_probabls.end(), 0,
lambda::_1 + lambda::bind(log, lambda::_2) );
}
and got following warning (which i can't understand):
c:\program files\boost\boost_1_36_0\boost\lambda\detail\lambda_traits.hpp(389)
: warning C4180: qualifier applied to function type has no meaning;
ignored
c:\program files\boost\boost_1_36_0\boost\lambda\detail\lambda_traits.hpp(458)
: see reference to class template instantiation
'boost::lambda::detail::bind_traits<T>' being compiled
with
[
T=double (double)
]
c:\users\kott\documents\visual studio
2008\projects\mbi\implementation\src\main.cpp(613) : see reference to
class template instantiation
'boost::lambda::detail::bind_tuple_mapper'
being compiled
with
[
T0=double (double),
T1=boost::lambda::placeholder2_type,
T2=boost::tuples::null_type,
T3=boost::tuples::null_type,
T4=boost::tuples::null_type,
T5=boost::tuples::null_type,
T6=boost::tuples::null_type,
T7=boost::tuples::null_type,
T8=boost::tuples::null_type,
T9=boost::tuples::null_type
]
c:\users\kott\documents\visual studio
2008\projects\mbi\implementation\src\main.cpp(698) : warning C4267:
'initializing' : conversion from 'size_t' to 'const int', possible
loss of data
c:\program files\microsoft visual studio 9.0\vc\include\numeric(45) :
warning C4244: '=' : conversion from 'double' to 'int', possible loss
of data
c:\program files\microsoft visual studio 9.0\vc\include\numeric(54) :
see reference to function template instantiation '_Ty
std::_Accumulate,_Ty,_Fn2>(_InIt,_InIt,_Ty,_Fn2)'
being compiled
with
[
_Ty=int,
_Alloc=std::allocator<double>,
_Fn2=boost::lambda::lambda_functorboost::lambda::plus_action,boost::tuples::tuple>,boost::lambda::lambda_functor>,boost::tuples::tuple>,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type>>>,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>>>,
_InIt=std::_Vector_const_iterator
]
c:\users\kott\documents\visual studio
2008\projects\mbi\implementation\src\main.cpp(613) : see reference to
function template instantiation '_Ty
std::accumulate,int,boost::lambda::lambda_functor<T>>(_InIt,_InIt,_Ty,_Fn2)'
being compiled
with
[
_Ty=int,
_Alloc=std::allocator<double>,
T=boost::lambda::lambda_functor_baseboost::lambda::plus_action,boost::tuples::tuple>,boost::lambda::lambda_functor>,boost::tuples::tuple>,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type>>>,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>>,
_InIt=std::_Vector_const_iterator,
_Fn2=boost::lambda::lambda_functorboost::lambda::plus_action,boost::tuples::tuple>,boost::lambda::lambda_functor>,boost::tuples::tuple>,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type,boost::lambda::detail::bind_traitsboost::tuples::null_type::type>>>,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>>>
]
what I'm doing wrong?