]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/phoenix/object/construct.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / phoenix / object / construct.hpp
1 /*==============================================================================
2 Copyright (c) 2001-2010 Joel de Guzman
3 Copyright (c) 2010 Thomas Heller
4
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
10
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>
18
19 #ifdef BOOST_PHOENIX_NO_VARIADIC_EXPRESSION
20 # include <boost/phoenix/object/detail/cpp03/construct_expr.hpp>
21 #else
22 BOOST_PHOENIX_DEFINE_EXPRESSION_VARARG(
23 (boost)(phoenix)(construct)
24 , (proto::terminal<detail::target<proto::_> >)
25 (meta_grammar)
26 , _
27 )
28 #endif
29
30 namespace boost { namespace phoenix
31 {
32 struct construct_eval
33 {
34 template <typename Sig>
35 struct result;
36
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>
41 {
42 };
43
44 template <typename Target, typename Context>
45 typename detail::result_of::target<Target>::type
46 operator()(Target, Context const &) const
47 {
48 return typename detail::result_of::target<Target>::type();
49 }
50
51 // Bring in the rest
52 #include <boost/phoenix/object/detail/cpp03/construct_eval.hpp>
53 #else
54 // TODO:
55 #endif
56 };
57
58 template <typename Dummy>
59 struct default_actions::when<rule::construct, Dummy>
60 : call<construct_eval, Dummy>
61 {};
62
63 #if defined(BOOST_PHOENIX_NO_VARIADIC_OBJECT)
64 template <typename T>
65 inline
66 typename expression::construct<detail::target<T> >::type const
67 construct()
68 {
69 return
70 expression::
71 construct<detail::target<T> >::
72 make(detail::target<T>());
73 }
74
75 // Bring in the rest
76 #include <boost/phoenix/object/detail/cpp03/construct.hpp>
77 #else
78 // TODO:
79 #endif
80 }}
81
82 #endif
83