Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3453: Using bind with Boost.Function won't compile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-15 18:09:19
#3453: Using bind with Boost.Function won't compile
-----------------------------------+----------------------------------------
Reporter: junfeng-guo@⦠| Owner: dgregor
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: function
Version: Boost 1.40.0 | Severity: Showstopper
Keywords: |
-----------------------------------+----------------------------------------
Comment(by steven_watanabe):
The following compiles for me against both 1.40 and the trunk.
{{{
#include <boost/function.hpp>
#include <boost/bind.hpp>
class button
{
public:
boost::function<void()> onClick;
};
class player
{
public:
void play(){};
void stop(){};
};
button playButton, stopButton;
player thePlayer;
void connect()
{
playButton.onClick = boost::bind(&player::play, &thePlayer);
stopButton.onClick = boost::bind(&player::stop, &thePlayer);
}
}}}
Can you post a complete self-contained example (with #includes) that
fails?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3453#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC