|
Boost Users : |
From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2006-11-08 02:42:08
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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net