Boost logo

Boost Users :

From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2005-09-01 11:35:58


On 9/1/05, jarvi <jarvi_at_[hidden]> wrote:
> Hello Stuart,
>
> Thanks for submitting a full program to try immediately.
>
> It seem to be a bug in Lambda, the type deduction gives bool for the
> type of
> the first branch, and const bool& for the second. And deems that both
> are convertible
> to each other and claims it's ambiguous.
>
> Best,
>
> Jaakko Järvi

Thanks for the quick reply - it's prompted me to try using const bool
rather than bool for the bind return type:

   boost::function<bool(char)> fn =
      if_then_else_return(var(b),
         bind<const bool>(&Test1, _1),
         constant(false)
      )

And that compiles. Thanks again!

Stuart Dootson


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