Boost logo

Boost Users :

Subject: Re: [Boost-users] [statechart] Problem compiling a statemachine with "class" insteadof "struct"
From: Rudolf Leitgeb (r.leitgeb_at_[hidden])
Date: 2009-02-16 09:56:14


> As Igor has already pointed out (thanks, Igor!), you *should* be able
> to use class instead of struct, as long as you ensure that everything
> needed by Boost.Statechart is public. However, I'm a bit puzzled by
> your example code above, as it does not contain any reactions typedef.
> Is that intentional?

The code snippet supplied was a heavily reduced sample piece. We tried
to keep our sample code as simple as possible to avoid confusion. The
state machine does nothing useful except highlight the problem we
encountered with a much more complex state machine.

> If so, then just changing class to struct should
> not cause the errors you report. If the amount of code is small (<
> 10k)
> you can post it here otherwise please send me the code by private
> email,
> see below for instructions.

The sample code is very small so I send it attached with this email.
There are two zip files, the one called class_test.zip contains the
code which triggers the problem. structversion.zip is essentially the
same code, except that state Active is now declared as struct. This
version compiles without a problem.

> By the way, please always add [statechart] to your subject line when
> asking questions regarding Boost.Statechart. This will usually ensure
> a much speedier response from me and also help other group members to
> filter the messages they are interested in.

Sorry, this was my first post to this forum. I've noticed it from other
posts to this list in the mean time.

Cheers,

Rudi


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net