It's not the vector, it's the copy constructor. You can see the same problem with :
RealStateMachine sma; RealStateMachine smb( sma );
At the moment I'm not sure exactly what makes it a recursive call. Was the generated state machine not thought to be copied, or did I made a mistake?
Yes, a state machine can be copied and no you didn't make any mistake. I think it's a compiler bug because: - it works fine with g++ 4.5 - the debugger doesn't even make it to the copy-constructor. I remember I had in the past problems when inheriting from a state machine with VC. The only solutions I see is to use a typedef instead or using aggregation instead of inheritance. This works: typedef boost::msm::back::state_machine< StateMachine > RealStateMachine; Unfortunately, I cannot help on this. Maybe Stephan is aware of this problem? Christophe