Boost logo

Boost Users :

Subject: Re: [Boost-users] question about using boost.function and boost.bind, V1.38
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2009-04-03 08:06:33


Igor R wrote:
>> // usage in a ctor initialisation list …, where m_button_monitor is of type
>> ButtonMonitor,
>>
>> , m_button_monitor(boost::bind(boost::mem_fn(&CView::OnRun), this,
>>

In addition to Igor's response, the above can be simplified as:

    m_button_monitor(boost::bind(&CView::OnRun,this,ID_TOOLBUTTON_AUTO))

bind's first argument can directly be a member function address.

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