Modify

Opened 7 years ago

Closed 7 years ago

#4926 closed Bugs (fixed)

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

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

Description

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

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Kozlov Taras

comment:1 Changed 7 years ago by Christophe Henry

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!

Christophe

comment:2 Changed 7 years ago by Christophe Henry

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christophe Henry.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.