Boost logo

Boost Users :

From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2006-02-27 18:43:47


It is getting late here in Switzerland. I've tried several things,
nothing worked and I don't have much of a clue at the moment. The fact
that two independent compilers choke on this pretty much rules out a
compiler bug. I think a library bug isn't likely either as everything
works when you make the innermost state non-templated. Moreover, the
newest version of TransitionTest.cpp (checked in yesterday) seems to
work perfectly on a number of platforms. That test does something very
similar to what you try to do. I can't currently see any other
explanation than that we must both be missing something. The attached
program is what I got after throwing out all the unnecessary stuff. It
compiles on MSVC, but as soon as you uncomment the commented parts it
complains with "'inner_context_type' : is not a member of
'NormalMode<Type>'". Tomorrow I'll try to reduce it to something that
hasn't anything to do with Boost.Statechart...

#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>

namespace sc = boost::statechart;
namespace mpl = boost::mpl;

template< typename Type > struct NormalMode;
struct Switch : sc::state_machine< Switch, NormalMode< int > > {};

/*template< typename Type >*/ struct Off;
template< typename Type >
struct NormalMode : sc::simple_state< NormalMode< Type >, Switch, Off/*<
Type >*/ >
{
};

//template< typename Type >
struct Off : sc::simple_state< Off/*< Type >*/, NormalMode< int > >
{
};

int main()
{
  Switch machine;
  machine.initiate();
  return 0;
}

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header. 

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