|
Boost : |
Subject: Re: [boost] [msm] Version 2.0 available
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2009-11-14 10:47:13
> MSM 1.20 allowed writing a state machine with actions/guards which
> modify some external state.
<snip/>
> I no longer instantiate the state machine directly and cannot pass
> parameters to constructor and it seems that msm::back::state_machine
> will not do this for me (after a quick glance at the definition it
> seemed to me that msm::back::state_machine expects its template
> parameter to be default constructible).
> Is this wrong or am I missing something obvious? Is there some way I
> could still achieve the old functionality?
No you're not doing anything wrong, it's a use case I simply oversaw,
so it's not your fault but mine ;-)
So, I corrected the problem and :
- added a templated constructor, with up to 5 arguments (can be
changed with the BOOST_MSM_CONSTRUCTOR_ARG_SIZE define)
- actualized the doc
- thanked you for this in the acknowledgments
You can download the change (in back/state machine.hpp) from the
sandbox (http://svn.boost.org/svn/boost/sandbox/msm/). I tested your
case and a few more so it should be ok now.
Thanks a lot for the report. I'm happy you like the library.
Regards,
Christophe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk