File indexing completed on 2025-01-18 09:43:31
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_PARAMETER_PREPROCESSOR_060206_HPP
0008 #define BOOST_PARAMETER_PREPROCESSOR_060206_HPP
0009
0010 #include <boost/parameter/aux_/preprocessor/impl/forwarding_overloads.hpp>
0011 #include <boost/parameter/aux_/preprocessor/impl/specification.hpp>
0012 #include <boost/preprocessor/cat.hpp>
0013
0014
0015 #define BOOST_PARAMETER_CONSTRUCTOR_AUX(class_, base, tag_namespace, args) \
0016 BOOST_PARAMETER_SPECIFICATION(tag_namespace, ctor, args, 0) \
0017 BOOST_PP_CAT(constructor_parameters, __LINE__); \
0018 BOOST_PARAMETER_CONSTRUCTOR_OVERLOADS(class_, base, args)
0019
0020
0021 #include <boost/parameter/aux_/preprocessor/impl/function_name.hpp>
0022
0023
0024 #define BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name, is_const) \
0025 template <typename Args> \
0026 typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name, is_const)< \
0027 Args \
0028 >::type BOOST_PARAMETER_FUNCTION_IMPL_NAME(name, is_const)( \
0029 Args const& args \
0030 )
0031
0032
0033 #include <boost/parameter/aux_/preprocessor/impl/parenthesized_return_type.hpp>
0034 #include <boost/parameter/config.hpp>
0035
0036
0037 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0038 #define BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_ns, args, is_const) \
0039 template <typename Args> \
0040 using BOOST_PARAMETER_FUNCTION_RESULT_NAME(name, is_const) \
0041 = typename BOOST_PARAMETER_PARENTHESIZED_RETURN_TYPE(result); \
0042 BOOST_PARAMETER_SPECIFICATION(tag_ns, name, args, is_const) \
0043 BOOST_PARAMETER_FUNCTION_SPECIFICATION_NAME(name, is_const);
0044
0045 #else
0046 #define BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_ns, args, is_const) \
0047 template <typename Args> \
0048 struct BOOST_PARAMETER_FUNCTION_RESULT_NAME(name, is_const) \
0049 : BOOST_PARAMETER_PARENTHESIZED_RETURN_TYPE(result) \
0050 { \
0051 }; \
0052 BOOST_PARAMETER_SPECIFICATION(tag_ns, name, args, is_const) \
0053 BOOST_PARAMETER_FUNCTION_SPECIFICATION_NAME(name, is_const);
0054
0055 #endif
0056
0057
0058 #define BOOST_PARAMETER_BASIC_FUNCTION_AUX(result, name, tag_ns, args) \
0059 BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_ns, args, 0) \
0060 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name, 0); \
0061 BOOST_PARAMETER_FUNCTION_FORWARD_OVERLOADS(name, name, args, 0, 0) \
0062 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name, 0)
0063
0064
0065 #include <boost/preprocessor/control/expr_if.hpp>
0066
0067
0068
0069
0070
0071 #define BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX(r, n, i, tag_ns, args, c) \
0072 BOOST_PARAMETER_FUNCTION_HEAD(r, i, tag_ns, args, c) \
0073 BOOST_PARAMETER_FUNCTION_FORWARD_OVERLOADS(n, i, args, 1, c) \
0074 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(i, c) BOOST_PP_EXPR_IF(c, const)
0075
0076
0077 #include <boost/parameter/aux_/preprocessor/impl/flatten.hpp>
0078
0079
0080
0081 #define BOOST_PARAMETER_CONSTRUCTOR(class_, base, tag_namespace, args) \
0082 BOOST_PARAMETER_CONSTRUCTOR_AUX( \
0083 class_, base, tag_namespace \
0084 , BOOST_PARAMETER_AUX_PP_FLATTEN(2, 2, 3, args) \
0085 )
0086
0087
0088
0089
0090 #define BOOST_PARAMETER_BASIC_FUNCTION(result, name, tag_namespace, args) \
0091 BOOST_PARAMETER_BASIC_FUNCTION_AUX( \
0092 result, name, tag_namespace \
0093 , BOOST_PARAMETER_AUX_PP_FLATTEN(2, 2, 3, args) \
0094 )
0095
0096
0097
0098
0099 #define BOOST_PARAMETER_BASIC_MEMBER_FUNCTION(result, name, tag_ns, args) \
0100 BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \
0101 result, name, name, tag_ns \
0102 , BOOST_PARAMETER_AUX_PP_FLATTEN(2, 2, 3, args), 0 \
0103 )
0104
0105
0106
0107
0108 #define BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION(r, name, tag_ns, args) \
0109 BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \
0110 r, name, name, tag_ns \
0111 , BOOST_PARAMETER_AUX_PP_FLATTEN(2, 2, 3, args), 1 \
0112 )
0113
0114
0115
0116
0117 #define BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR(result, tag_ns, args) \
0118 BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \
0119 result, operator(), operator, tag_ns \
0120 , BOOST_PARAMETER_AUX_PP_FLATTEN(2, 2, 3, args), 0 \
0121 )
0122
0123
0124
0125
0126 #define BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR(r, tag_ns, args) \
0127 BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \
0128 r, operator(), operator, tag_ns \
0129 , BOOST_PARAMETER_AUX_PP_FLATTEN(2, 2, 3, args), 1 \
0130 )
0131
0132
0133 #include <boost/parameter/aux_/preprocessor/impl/function_dispatch_layer.hpp>
0134
0135
0136 #define BOOST_PARAMETER_FUNCTION_AUX(result, name, tag_ns, args) \
0137 BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_ns, args, 0) \
0138 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name, 0); \
0139 BOOST_PARAMETER_FUNCTION_FORWARD_OVERLOADS(name, name, args, 0, 0) \
0140 BOOST_PARAMETER_FUNCTION_DISPATCH_LAYER( \
0141 1, (name, BOOST_PARAMETER_FUNCTION_SPLIT_ARGS(args), 0, 0, tag_ns) \
0142 )
0143
0144
0145
0146
0147 #define BOOST_PARAMETER_FUNCTION(result, name, tag_namespace, args) \
0148 BOOST_PARAMETER_FUNCTION_AUX( \
0149 result, name, tag_namespace \
0150 , BOOST_PARAMETER_AUX_PP_FLATTEN(3, 2, 3, args) \
0151 )
0152
0153
0154 #include <boost/preprocessor/control/if.hpp>
0155
0156
0157
0158
0159
0160 #define BOOST_PARAMETER_MEMBER_FUNCTION_AUX(r, name, impl, tag_ns, c, args) \
0161 BOOST_PARAMETER_FUNCTION_HEAD(r, impl, tag_ns, args, c) \
0162 BOOST_PARAMETER_FUNCTION_FORWARD_OVERLOADS(name, impl, args, 1, c) \
0163 BOOST_PARAMETER_FUNCTION_DISPATCH_LAYER( \
0164 0, ( \
0165 impl \
0166 , BOOST_PARAMETER_FUNCTION_SPLIT_ARGS(args) \
0167 , BOOST_PP_IF( \
0168 BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(impl) \
0169 , 0 \
0170 , 1 \
0171 ) \
0172 , c \
0173 , tag_ns \
0174 ) \
0175 )
0176
0177
0178
0179
0180 #define BOOST_PARAMETER_MEMBER_FUNCTION(result, name, tag_ns, args) \
0181 BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \
0182 result, name, name, tag_ns, 0 \
0183 , BOOST_PARAMETER_AUX_PP_FLATTEN(3, 2, 3, args) \
0184 )
0185
0186
0187
0188
0189
0190 #define BOOST_PARAMETER_CONST_MEMBER_FUNCTION(result, name, tag_ns, args) \
0191 BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \
0192 result, name, name, tag_ns, 1 \
0193 , BOOST_PARAMETER_AUX_PP_FLATTEN(3, 2, 3, args) \
0194 )
0195
0196
0197
0198
0199 #define BOOST_PARAMETER_FUNCTION_CALL_OPERATOR(result, tag_ns, args) \
0200 BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \
0201 result, operator(), operator, tag_ns, 0 \
0202 , BOOST_PARAMETER_AUX_PP_FLATTEN(3, 2, 3, args) \
0203 )
0204
0205
0206
0207
0208
0209 #define BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, args) \
0210 BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \
0211 result, operator(), operator, tag_ns, 1 \
0212 , BOOST_PARAMETER_AUX_PP_FLATTEN(3, 2, 3, args) \
0213 )
0214
0215
0216 #endif
0217