
8 Nov
2006
8 Nov
'06
7:42 a.m.
Hi Stuart!
Try this -
boost::function< double (std::size_t) > wf = (sIndex < m_maxIndex+1) ? boost::function< double (std::size_t) >( boost::lambda::bind(boost::ref(m_cf), sDeg, boost::lambda::_1) ) ) : ( boost::ref(*m_wf) );
i.e. make sure the first expression is explicitly a boost::function< double (std::size_t) >, as the second is convertible to that.
Cool, this works! But why is this explicit cast necessary in this case? Greetings, Sebastian Weber
Stuart Dootson _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users