1 /*==============================================================================
2 Copyright (c) 2001-2010 Joel de Guzman
3 Copyright (c) 2010 Thomas Heller
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #ifndef BOOST_PHOENIX_OBJECT_CONSTRUCT_HPP
9 #define BOOST_PHOENIX_OBJECT_CONSTRUCT_HPP
11 #include <boost/phoenix/core/limits.hpp>
12 #include <boost/phoenix/core/call.hpp>
13 #include <boost/phoenix/core/expression.hpp>
14 #include <boost/phoenix/core/meta_grammar.hpp>
15 #include <boost/phoenix/object/detail/target.hpp>
16 #include <boost/phoenix/support/iterate.hpp>
17 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
19 #ifdef BOOST_PHOENIX_NO_VARIADIC_EXPRESSION
20 # include <boost/phoenix/object/detail/cpp03/construct_expr.hpp>
22 BOOST_PHOENIX_DEFINE_EXPRESSION_VARARG(
23 (boost)(phoenix)(construct)
24 , (proto::terminal<detail::target<proto::_> >)
30 namespace boost { namespace phoenix
34 template <typename Sig>
37 #if defined(BOOST_PHOENIX_NO_VARIADIC_OBJECT)
38 template <typename This, typename A0, typename Context>
39 struct result<This(A0, Context)>
40 : detail::result_of::target<A0>
44 template <typename Target, typename Context>
45 typename detail::result_of::target<Target>::type
46 operator()(Target, Context const &) const
48 return typename detail::result_of::target<Target>::type();
52 #include <boost/phoenix/object/detail/cpp03/construct_eval.hpp>
58 template <typename Dummy>
59 struct default_actions::when<rule::construct, Dummy>
60 : call<construct_eval, Dummy>
63 #if defined(BOOST_PHOENIX_NO_VARIADIC_OBJECT)
66 typename expression::construct<detail::target<T> >::type const
71 construct<detail::target<T> >::
72 make(detail::target<T>());
76 #include <boost/phoenix/object/detail/cpp03/construct.hpp>