|
Boost Users : |
From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2006-11-07 13:16:56
Hi Nat!
> [Nat] Does it work better if the 'else' clause is something more like:
>
> ( boost::lambda::bind(boost::ref(*m_wf)) )
Well, not really. If I do that, I get the error.
error: no match for ternary 'operator?:' in '(sIndex <
(((boost::cor_cm_iterator4<RandomGenerator,
Graph>*)this)->boost::cor_cm_iterator4<RandomGenerator,
Graph>::m_maxIndex + 1)) ?
boost::lambda::bind(boost::ref(((boost::cor_cm_iterator4<RandomGenerator, Graph>*)this)->boost::cor_cm_iterator4<RandomGenerator, Graph>::m_cf), minDeg, boost::lambda::<unnamed>::_1) : boost::lambda::bind(boost::ref((*((boost::cor_cm_iterator4<RandomGenerator, Graph>*)this)->boost::cor_cm_iterator4<RandomGenerator, Graph>::m_wf)))'
> ? This is a wild guess, but boost::ref() isn't by itself a lambda bind
> expression -- is it? Both halves of the ternary operator are convertible
> to boost::function -- but they're not the same type.
>
> I don't know whether two different boost::lambda::bind expressions are
> going to be compatible either. You may have to explicitly instantiate
> boost::function objects on both sides of the : -- which would end up
> being less terse than writing the if/else statement. But it seems worth
> a try.
I actually have no clue. Nevertheless, I'm already very happy to have
written my first lambda-stuff without struggling to much with it - it is
quite a magic thing to get it working for a beginner. Anyway thanks for
your response.
Greetings,
Sebastian
> _______________________________________________
> 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