Return-path: <boost-users-bounces@lists.boost.org>
Envelope-to: greened@obbligato.org
Received: from milliways.osl.iu.edu ([129.79.245.239])
	by johnson.obbligato.org with esmtp (Exim 4.60)
	(envelope-from <boost-users-bounces@lists.boost.org>)
	id 1FDs8Y-0001Z8-DF
	for greened@obbligato.org; Mon, 27 Feb 2006 17:52:50 -0600
Received: from milliways.osl.iu.edu (localhost [127.0.0.1])
	by milliways.osl.iu.edu (8.13.1/8.13.1/IUCS_Alternate_Port_1.9) with
	ESMTP id k1RNh0vb022801; Mon, 27 Feb 2006 18:45:01 -0500
Received: from ciao.gmane.org (main.gmane.org [80.91.229.2])
	by milliways.osl.iu.edu (8.13.1/8.13.1/IUCS_2.72) with ESMTP id
	k1RNgvqC022794
	for <boost-users@lists.boost.org>; Mon, 27 Feb 2006 18:42:57 -0500
Received: from list by ciao.gmane.org with local (Exim 4.43)
	id 1FDs0v-0000qi-O9
	for boost-users@lists.boost.org; Tue, 28 Feb 2006 00:42:49 +0100
Received: from 234.216.77.83.cust.bluewin.ch ([83.77.216.234])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <boost-users@lists.boost.org>; Tue, 28 Feb 2006 00:42:49 +0100
Received: from ahd6974-spamgroupstrap by 234.216.77.83.cust.bluewin.ch with
	local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <boost-users@lists.boost.org>; Tue, 28 Feb 2006 00:42:49 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: boost-users@lists.boost.org
From: "Andreas Huber" <ahd6974-spamgroupstrap@yahoo.com>
Date: Tue, 28 Feb 2006 00:43:47 +0100
Message-ID: <du02p7$vat$1@sea.gmane.org>
References: <440331DA.1010401@obbligato.org> <dtvl0b$fa3$1@sea.gmane.org>
	<44036C15.6020209@obbligato.org>
Mime-Version: 1.0
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: 234.216.77.83.cust.bluewin.ch
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.3.0.0,
	Antispam-Data: 2006.02.27.142607
Subject: Re: [Boost-users] [statechart] Template States, Compile Error
X-BeenThere: boost-users@lists.boost.org
X-Mailman-Version: 2.1.6
Precedence: list
Reply-To: boost-users@lists.boost.org
List-Id: Boost Users mailing list <boost-users.lists.boost.org>
List-Unsubscribe: <http://lists.boost.org/mailman/listinfo.cgi/boost-users>,
	<mailto:boost-users-request@lists.boost.org?subject=unsubscribe>
List-Archive: <http://lists.boost.org/MailArchives/boost-users>
List-Post: <mailto:boost-users@lists.boost.org>
List-Help: <mailto:boost-users-request@lists.boost.org?subject=help>
List-Subscribe: <http://lists.boost.org/mailman/listinfo.cgi/boost-users>,
	<mailto:boost-users-request@lists.boost.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: boost-users-bounces@lists.boost.org
Errors-To: boost-users-bounces@lists.boost.org

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 mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
