[statechart] post_event() and Boost.Bind

Currently I don't understand why the following code dosn't compile (with VC
8.0). I simply try to bind the post_event() method from the state_machine to
a function object. To illustrate the problem I've added the following code
to the Camera.hpp file of the Camera example from the Statechart library:
#include

Hi,
After uncommenting the marked line the compiler produce more than 200 error messages: A function template has too few arguments. But the line above compiles very well and the process_event() method has the same signature.
In the StateChart documentation I can see that the difference between
post_event and process_event is that the former has 2 overloads. So I
guess you'll have to specify which one you wish to use. Something
like:
bind(static_cast

Thanks for your helpful advice. The following line
post_event_fun_ = boost::bind( static_cast
Hi,
After uncommenting the marked line the compiler produce more than 200 error messages: A function template has too few arguments. But the line above compiles very well and the process_event() method has the same signature.
In the StateChart documentation I can see that the difference between post_event and process_event is that the former has 2 overloads. So I guess you'll have to specify which one you wish to use. Something like:
bind(static_cast
(&Camera::post_event), boost::ref(*this ), _1 ); Bruno
participants (2)
-
Bruno Lalande
-
Commander Pirx