|
Boost Users : |
Subject: Re: [Boost-users] [bind, function] pointer to member function under Xcode 4.1.1
From: Nat Linden (nat_at_[hidden])
Date: 2012-08-13 15:01:50
On Mon, Aug 13, 2012 at 2:35 PM, Stuart Malone
<samalone_at_[hidden]> wrote:
> #include <boost/bind.hpp>
> #include <boost/function.hpp>
>
> struct Monitor {
> void Change(int a, int b);
>
> void Lose() {
> auto b = boost::bind(&Monitor::Change, this);
Try:
auto b = boost::bind(&Monitor::Change, this, _1, _2);
boost::bind(&Monitor::Change, this) looks like a nullary callable,
which doesn't fit well with either the real signature of
Monitor::Change or with your boost::function signature.
> boost::function<void (int, int)> f(b);
> }
> };
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