|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2001-03-22 19:45:42
on 3/21/01 2:19 AM, emontag_at_[hidden] at emontag_at_[hidden] wrote:
> I don't think you can do what you are trying to do. I've tried with several
> complilers, and they all complain. The most comprehensible compiler error
> complains about a circular reference between turnstile and base_fm - which is
> true. The base type is trying to access a typedef which is contained within
> the derived type.
OK. I didn't use statements like "typedef DerivedFSM::state_type
state_type" to avoid this recursion problem. I guess my indirect techniques
of not using typedef-s didn't fool any compilers. I should change the
"fsm_base" class template to get the state type, etc. as template
parameters.
> --- In boost_at_y..., darylew_at_m... wrote:
>> I've uploaded an interim version (0) of "fsm.zip" to the Yahoo-groups vault.
>> It's a rip-off of Coplien's FSM structure I saw in an Usenet thread. A
>> variant I did was to not have the state and stimulus types as template
>> parameters, but as subtypes of the middle FSM class instead, becuase they're
>> never independent of the FSM class. But I'm getting errors like:
>>
>> //==================
>> Error : 'stimulus_type' is not a struct/union/class member
>> (instantiating: 'boost::fsm_base<turnstile>')
>> fsm.hpp line 44 void fire( typename DerivedFSM::stimulus_type
>> s );
>> //==================
>>
>> I'm using Metrowerks CodeWarrior Pro 5, with 5.3 update, on the Mac OS. Is
>> this an error on my part or the compiler's? How can I fix it?
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk