
while developing I want to use functors for a guard. The state machine compiles well until I added a function call to the FSM which has a template parameter. Then I always got the following error message while compiling it with gcc 4.4.1.
SubtractionControllerNew.cpp: In member function ‘bool<unnamed>::player_::isCDLoaded::operator()(const EVT&, FSM&, SourceState&, TargetState&)’: SubtractionControllerNew.cpp:175: error: expected primary-expression before ‘>’ token SubtractionControllerNew.cpp:175: error: expected primary-expression before ‘)’ token Does anybody know why this happens and how to circumvent it?
I admit C++ is sometimes full of hard-to-get rules :(
Try adding a template keyword:
struct isCDLoaded
{
template