我想我可能已经找到了答案。我将等待来自boost列表的验证,但看起来文档只是错误的,如果您按照相机示例中的说明进行定制反应,它就可以正常工作。即选择点模板需要更改为:
// universal choice point base class template
template< class MostDerived, class Context >
struct choice_point : sc::state< MostDerived, Context >
{
typedef sc::state< MostDerived, Context > base_type;
typedef typename base_type::my_context my_context;
typedef choice_point my_base;
typedef sc::custom_reaction<make_choice> reactions;
choice_point( my_context ctx ) : base_type( ctx )
{
this->post_event( boost::intrusive_ptr< make_choice >(
new make_choice() ) );
}
};