Ticket #4926 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

MSM deferred events doesn`t works when compile using msvc 8.0

Reported by: anonymous Owned by: chenry
Milestone: To Be Determined Component: msm
Version: Boost 1.45.0 Severity: Problem
Keywords: msm msvc 8 Cc:


Porting my state machine from Boost.Statechart to MSM I have came across with strange problem, events deferring feature that worked well with msvc 10.0 in test programs, doesn`t want to work in real application compiled with msvc 8.0. After digging in msm sources I found the place and found how to fix it. In msm/back/state_machine.hpp there is template handle_defer_helper which, as I found, always use empty implementation. I have check has_fsm_deferred_events metafunctor and it return true, but vc 8.0 compiler continues to use empty implementation. I replaced enable_ifs return type from void to int and it helped. Seems void type is some kind of "priviledged type" for msvc, I dont know how to explain it.

Patch attached to bug


01-msm-defer-events-bug.patch (1.2 KB) - added by Kozlov Taras 6 years ago.

Change History

Changed 6 years ago by Kozlov Taras

comment:1 Changed 6 years ago by chenry

Fascinating! VC8 is really full of surprises. I don't think void is a special type. Indeed, inside handle_defer_helper I use deferred_msg_queue_helper, which uses the exact same construct. And it works otherwise the problem would still be there. Looks like another random VC8 bug.

Whatever, if this makes it work, I'm happy to apply the patch for the 1.46. As I don't have this compiler any more, I'll trust you that it works with VC8. Fixed inside trunk revision 67253. Thanks a lot for your valuable report and the patch!


comment:2 Changed 6 years ago by chenry

  • Status changed from new to closed
  • Resolution set to fixed

Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.