Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind, function] pointer to member function under Xcode 4.1.1
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2012-08-13 14:59:49


On 8/13/2012 2:35 PM, Stuart Malone wrote:
> I'm having trouble compiling some very simple boost::function and
> boost::bind code under Xcode 4.4.1 using the default Apple LLVM compiler
> 4.0. I've simplified the code down to:
>
> #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);

shouldn't this be:

auto b = boost::bind(&Monitor::Change, this, _1, _2);

> boost::function<void (int, int)> f(b);
> }
> };

Jeff


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