/*============================================================================= Copyright (c) 2001-2007 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #ifndef PHOENIX_CORE_COMPOSITE_HPP #define PHOENIX_CORE_COMPOSITE_HPP #include #include #include #include #include #include #include #include #include namespace boost { namespace phoenix { namespace detail { template struct composite_eval; struct compute_no_nullary { template struct apply { typedef typename mpl::or_::type type; }; }; } template struct composite : EvalTuple { typedef EvalTuple base_type; typedef composite self_type; typedef EvalPolicy eval_policy_type; typedef typename mpl::fold< EvalTuple , mpl::false_ , detail::compute_no_nullary >::type no_nullary; template struct result { typedef typename detail::composite_eval< fusion::result_of::size::value>:: template result::type type; }; composite() : base_type() {} composite(base_type const& base) : base_type(base) {} template composite(U0& _0) : base_type(_0) {} template composite(U0& _0, U1& _1) : base_type(_0, _1) {} template typename result::type eval(Env const& env) const { typedef typename result::type return_type; return detail:: composite_eval::value>::template call(*this, env); } // Bring in the rest of the constructors #include }; // Bring in the detail::composite_eval<0..N> definitions #include }} #endif