|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59506 - trunk/boost/statechart
From: ahd6974-boostorg_at_[hidden]
Date: 2010-02-05 05:38:22
Author: andreas_huber69
Date: 2010-02-05 05:38:21 EST (Fri, 05 Feb 2010)
New Revision: 59506
URL: http://svn.boost.org/trac/boost/changeset/59506
Log:
simple_state::context() now also finds bases of state types.
Text files modified:
trunk/boost/statechart/simple_state.hpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Modified: trunk/boost/statechart/simple_state.hpp
==============================================================================
--- trunk/boost/statechart/simple_state.hpp (original)
+++ trunk/boost/statechart/simple_state.hpp 2010-02-05 05:38:21 EST (Fri, 05 Feb 2010)
@@ -1,7 +1,7 @@
#ifndef BOOST_STATECHART_SIMPLE_STATE_HPP_INCLUDED
#define BOOST_STATECHART_SIMPLE_STATE_HPP_INCLUDED
//////////////////////////////////////////////////////////////////////////////
-// Copyright 2002-2008 Andreas Huber Doenni
+// Copyright 2002-2010 Andreas Huber Doenni
// Distributed under the Boost Software License, Version 1.0. (See accompany-
// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//////////////////////////////////////////////////////////////////////////////
@@ -47,6 +47,7 @@
#include <boost/get_pointer.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/assert.hpp>
+#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
#include <boost/cast.hpp> // boost::polymorphic_downcast
@@ -234,7 +235,7 @@
OtherContext & context()
{
typedef typename mpl::if_<
- is_same< OtherContext, MostDerived >,
+ is_base_of< OtherContext, MostDerived >,
context_impl_this_context,
context_impl_other_context
>::type impl;
@@ -245,7 +246,7 @@
const OtherContext & context() const
{
typedef typename mpl::if_<
- is_same< OtherContext, MostDerived >,
+ is_base_of< OtherContext, MostDerived >,
context_impl_this_context,
context_impl_other_context
>::type impl;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk