1 /*============================================================================== 2 Copyright (c) 2005-2010 Joel de Guzman 3 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 #ifndef BOOST_PHOENIX_CORE_IS_ACTOR_HPP 8 #define BOOST_PHOENIX_CORE_IS_ACTOR_HPP 9 10 #include <boost/mpl/bool.hpp> 11 12 // Note to Thomas and any future maintainer: please make this as 13 // lightweight as possible (as it is right now). 14 15 namespace boost { namespace phoenix 16 { 17 /////////////////////////////////////////////////////////////////////////////// 18 // 19 // is_actor<T> 20 // 21 // Tests if T is an actor. Evaluates to mpl::true_ or mpl::false_ 22 // 23 /////////////////////////////////////////////////////////////////////////////// 24 25 template <typename Expr> 26 struct actor; 27 28 template <typename T, typename Enable = void> 29 struct is_actor 30 : mpl::false_ 31 {}; 32 33 template <typename T> 34 struct is_actor<T const> 35 : is_actor<T> 36 {}; 37 38 template <typename T> 39 struct is_actor<T &> 40 : is_actor<T> 41 {}; 42 43 template <typename Expr> 44 struct is_actor<actor<Expr> > 45 : mpl::true_ 46 {}; 47 }} 48 49 #endif 50