]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/parameter/aux_/preprocessor/impl/specification.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / parameter / aux_ / preprocessor / impl / specification.hpp
1 // Copyright Daniel Wallin 2006.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_SPECIFICATION_HPP
7 #define BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_SPECIFICATION_HPP
8
9 #include <boost/parameter/optional.hpp>
10
11 // Helper macros for BOOST_PARAMETER_SPECIFICATION_ELEM_R.
12 #define BOOST_PARAMETER_QUALIFIED_TAG_optional(tag) \
13 optional<tag
14 /**/
15
16 #include <boost/parameter/required.hpp>
17
18 #define BOOST_PARAMETER_QUALIFIED_TAG_required(tag) \
19 required<tag
20 /**/
21
22 #include <boost/parameter/deduced.hpp>
23
24 #define BOOST_PARAMETER_QUALIFIED_TAG_deduced_optional(tag) \
25 optional< ::boost::parameter::deduced<tag>
26 /**/
27
28 #define BOOST_PARAMETER_QUALIFIED_TAG_deduced_required(tag) \
29 required< ::boost::parameter::deduced<tag>
30 /**/
31
32 #include <boost/parameter/aux_/preprocessor/impl/argument_specs.hpp>
33 #include <boost/parameter/config.hpp>
34 #include <boost/preprocessor/punctuation/comma_if.hpp>
35 #include <boost/preprocessor/cat.hpp>
36
37 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
38
39 #include <boost/parameter/aux_/use_default.hpp>
40
41 #define BOOST_PARAMETER_SPECIFICATION_ELEM_R(r, tag_namespace, i, elem) \
42 BOOST_PP_COMMA_IF(i) ::boost::parameter::BOOST_PP_CAT( \
43 BOOST_PARAMETER_QUALIFIED_TAG_ \
44 , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \
45 )(tag_namespace::BOOST_PARAMETER_FN_ARG_NAME(elem)) \
46 , ::boost::parameter::aux::use_default \
47 >
48 /**/
49
50 #else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
51
52 #include <boost/parameter/aux_/pp_impl/unwrap_predicate.hpp>
53
54 // Expands to each boost::parameter::parameters<> element type.
55 #define BOOST_PARAMETER_SPECIFICATION_ELEM_R(r, tag_namespace, i, elem) \
56 BOOST_PP_COMMA_IF(i) ::boost::parameter::BOOST_PP_CAT( \
57 BOOST_PARAMETER_QUALIFIED_TAG_ \
58 , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \
59 )(tag_namespace::BOOST_PARAMETER_FN_ARG_NAME(elem)) \
60 , typename ::boost::parameter::aux::unwrap_predicate< \
61 void BOOST_PARAMETER_FN_ARG_PRED(elem) \
62 >::type \
63 >
64 /**/
65
66 #endif // Borland workarounds needed.
67
68 #include <boost/parameter/parameters.hpp>
69 #include <boost/parameter/aux_/preprocessor/impl/function_name.hpp>
70 #include <boost/preprocessor/control/if.hpp>
71 #include <boost/preprocessor/seq/for_each_i.hpp>
72
73 // Expands to a boost::parameter::parameters<> specialization for the
74 // function named base. Used by BOOST_PARAMETER_CONSTRUCTOR_AUX and
75 // BOOST_PARAMETER_FUNCTION_HEAD for their respective ParameterSpec models.
76 #define BOOST_PARAMETER_SPECIFICATION(tag_ns, base, split_args, is_const) \
77 template <typename BoostParameterDummy> \
78 struct BOOST_PP_CAT( \
79 BOOST_PP_CAT( \
80 BOOST_PP_IF( \
81 is_const \
82 , boost_param_params_const_ \
83 , boost_param_params_ \
84 ) \
85 , __LINE__ \
86 ) \
87 , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \
88 ) : ::boost::parameter::parameters< \
89 BOOST_PP_SEQ_FOR_EACH_I( \
90 BOOST_PARAMETER_SPECIFICATION_ELEM_R, tag_ns, split_args \
91 ) \
92 > \
93 { \
94 }; \
95 typedef BOOST_PP_CAT( \
96 BOOST_PP_CAT( \
97 BOOST_PP_IF( \
98 is_const \
99 , boost_param_params_const_ \
100 , boost_param_params_ \
101 ) \
102 , __LINE__ \
103 ) \
104 , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \
105 )<int>
106 /**/
107
108 #endif // include guard
109