Boost logo

Boost Users :

From: Eoin (eoin-keyword-boostusers.07781a_at_[hidden])
Date: 2006-06-28 12:04:01


Hello,

My name is Eoin O'Callaghan I've run into a difficulty with the Boost
Statechart library as I was porting my code from MSVC-7.1 to work with
MinGW also. MinGW gives an error regarding the ctx parameter used with
non simple states when the state is a template class;

MinGWFail.cpp:24: error: expected `)' before "ctx"
MinGWFail.cpp:29: error: expected constructor, destructor, or type
conversion before '(' token

I've attached a small file which replicates the problem. Note that if
the content state is a simple_state then both MSVC-7.1 and MinGW compile
without errors.

Hope someone can make some sense of this, thanks the the author for
making such an excellent library free for everyone. (Indeed thanks to
all those involved in Boost :) )

Kind regards, Eoin.


#include <boost/statechart/event.hpp>
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/state.hpp>
#include <boost/statechart/simple_state.hpp>
#include <boost/statechart/transition.hpp>
#include <boost/statechart/custom_reaction.hpp>

template<class P>
class content;

class parser :
        public boost::statechart::state_machine<parser, content<parser> >
{
public:
        parser();
        virtual ~parser() {}
};

template<class P>
struct content : boost::statechart::state<content<P>, P>
{
public:
        content(my_context ctx);
        virtual ~content() {}
};

template<class P>
content<P>::content(my_context ctx) :
        my_base(ctx)
{}


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