Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:43:27

0001 // Copyright Daniel Wallin 2006.
0002 // Copyright Cromwell D. Enage 2017.
0003 // Distributed under the Boost Software License, Version 1.0.
0004 // (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_FUNCTION_DISPATCH_LAYER_HPP
0008 #define BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_FUNCTION_DISPATCH_LAYER_HPP
0009 
0010 #include <boost/preprocessor/cat.hpp>
0011 
0012 // Expands to keyword_tag_type for some keyword_tag.
0013 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_TYPE(keyword_tag)              \
0014     BOOST_PP_CAT(keyword_tag, _type)
0015 /**/
0016 
0017 // Expands to a template parameter for each dispatch function.
0018 #define BOOST_PARAMETER_FUNCTION_DISPATCH_TEMPLATE_ARG(r, macro, arg)        \
0019   , typename BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_TYPE(macro(arg))
0020 /**/
0021 
0022 #include <boost/parameter/config.hpp>
0023 
0024 #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0025 
0026 // Expands to a forwarding parameter for a dispatch function.
0027 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_DEFN(r, macro, arg)            \
0028   , BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_TYPE(macro(arg))&& macro(arg)
0029 /**/
0030 
0031 #include <utility>
0032 
0033 // Expands to an argument passed from one dispatch function to the next.
0034 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_FWD(r, macro, arg)             \
0035   , ::std::forward<                                                          \
0036         BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_TYPE(macro(arg))               \
0037     >(macro(arg))
0038 /**/
0039 
0040 #else   // !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0041 
0042 // Expands to a forwarding parameter for a dispatch function.  The parameter
0043 // type stores its const-ness.
0044 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_DEFN(r, macro, arg)            \
0045   , BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_TYPE(macro(arg))& macro(arg)
0046 /**/
0047 
0048 #include <boost/parameter/aux_/as_lvalue.hpp>
0049 
0050 // Expands to an argument passed from one dispatch function to the next.
0051 // Explicit forwarding takes the form of forcing the argument to be an lvalue.
0052 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_FWD(r, macro, arg)             \
0053   , ::boost::parameter::aux::as_lvalue(macro(arg))
0054 /**/
0055 
0056 #endif  // BOOST_PARAMETER_HAS_PERFECT_FORWARDING
0057 
0058 #include <boost/parameter/aux_/preprocessor/impl/argument_specs.hpp>
0059 #include <boost/parameter/aux_/preprocessor/impl/split_args.hpp>
0060 #include <boost/preprocessor/seq/for_each.hpp>
0061 #include <boost/preprocessor/seq/first_n.hpp>
0062 
0063 // Iterates through all required arguments and the first n optional arguments,
0064 // passing each argument to the specified macro.
0065 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_REPEAT(macro, n, split_args)   \
0066     BOOST_PP_SEQ_FOR_EACH(                                                   \
0067         macro                                                                \
0068       , BOOST_PARAMETER_FN_ARG_NAME                                          \
0069       , BOOST_PARAMETER_SPLIT_ARG_REQ_SEQ(split_args)                        \
0070     )                                                                        \
0071     BOOST_PP_SEQ_FOR_EACH(                                                   \
0072         macro                                                                \
0073       , BOOST_PARAMETER_FN_ARG_NAME                                          \
0074       , BOOST_PP_SEQ_FIRST_N(                                                \
0075             n, BOOST_PARAMETER_SPLIT_ARG_OPT_SEQ(split_args)                 \
0076         )                                                                    \
0077     )
0078 /**/
0079 
0080 #include <boost/parameter/aux_/preprocessor/impl/function_dispatch_tuple.hpp>
0081 #include <boost/parameter/aux_/preprocessor/impl/function_name.hpp>
0082 #include <boost/preprocessor/control/if.hpp>
0083 
0084 // Produces a name for the dispatch functions.
0085 #define BOOST_PARAMETER_FUNCTION_DISPATCH_NAME(x, n)                         \
0086     BOOST_PP_CAT(                                                            \
0087         BOOST_PP_CAT(                                                        \
0088             BOOST_PP_IF(                                                     \
0089                 BOOST_PARAMETER_FUNCTION_DISPATCH_IS_CONST(x)                \
0090               , boost_param_dispatch_const_                                  \
0091               , boost_param_dispatch_                                        \
0092             )                                                                \
0093           , BOOST_PP_CAT(BOOST_PP_CAT(n, boost_), __LINE__)                  \
0094         )                                                                    \
0095       , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(                                \
0096             BOOST_PARAMETER_FUNCTION_DISPATCH_BASE_NAME(x)                   \
0097         )                                                                    \
0098     )
0099 /**/
0100 
0101 // Expands to the template parameter list of the dispatch function with all
0102 // required and first n optional parameters; also extracts the static keyword
0103 // if present.
0104 #define BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(n, x)                     \
0105     template <                                                               \
0106         typename ResultType, typename Args                                   \
0107         BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_REPEAT(                        \
0108             BOOST_PARAMETER_FUNCTION_DISPATCH_TEMPLATE_ARG                   \
0109           , n                                                                \
0110           , BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)                  \
0111         )                                                                    \
0112     > BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(                                \
0113         BOOST_PARAMETER_FUNCTION_DISPATCH_BASE_NAME(x)                       \
0114     )
0115 /**/
0116 
0117 #include <boost/parameter/aux_/use_default_tag.hpp>
0118 #include <boost/preprocessor/control/expr_if.hpp>
0119 #include <boost/preprocessor/punctuation/comma_if.hpp>
0120 
0121 // Expands to the result type, name, parenthesized list of all required and
0122 // n optional parameters, and const-ness of the dispatch function; the bit
0123 // value b determines whether or not this dispatch function takes in
0124 // boost::parameter::aux::use_default_tag as its last parameter.
0125 #define BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(n, x, b1, b2)             \
0126     ResultType BOOST_PARAMETER_FUNCTION_DISPATCH_NAME(x, b1)(                \
0127         ResultType(*)(), Args const& args, long                              \
0128         BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_REPEAT(                        \
0129             BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_DEFN                       \
0130           , n                                                                \
0131           , BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)                  \
0132         )                                                                    \
0133         BOOST_PP_COMMA_IF(b2)                                                \
0134         BOOST_PP_EXPR_IF(b2, ::boost::parameter::aux::use_default_tag)       \
0135     ) BOOST_PP_EXPR_IF(BOOST_PARAMETER_FUNCTION_DISPATCH_IS_CONST(x), const)
0136 /**/
0137 
0138 // Expands to a forward declaration of the dispatch function that takes in
0139 // all required and the first n optional parameters, but not
0140 // boost::parameter::aux::use_default_tag.
0141 #define BOOST_PARAMETER_FUNCTION_DISPATCH_FWD_DECL_0_Z(z, n, x)              \
0142     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(n, x)                         \
0143     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(n, x, 0, 0);
0144 /**/
0145 
0146 // Expands to a forward declaration of the dispatch function that takes in
0147 // all required parameters, the first n optional parameters, and
0148 // boost::parameter::aux::use_default_tag.
0149 #define BOOST_PARAMETER_FUNCTION_DISPATCH_FWD_DECL_1_Z(z, n, x)              \
0150     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(n, x)                         \
0151     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(n, x, 0, 1);
0152 /**/
0153 
0154 #include <boost/preprocessor/seq/elem.hpp>
0155 
0156 // Expands to the default value of the (n + 1)th optional parameter.
0157 #define BOOST_PARAMETER_FUNCTION_DISPATCH_DEFAULT_AUX(n, s_args)             \
0158     BOOST_PARAMETER_FN_ARG_DEFAULT(                                          \
0159         BOOST_PP_SEQ_ELEM(n, BOOST_PARAMETER_SPLIT_ARG_OPT_SEQ(s_args))      \
0160     )
0161 /**/
0162 
0163 #include <boost/parameter/keyword.hpp>
0164 
0165 // Expands to the assignment portion which binds the default value to the
0166 // (n + 1)th optional parameter before composing it with the argument-pack
0167 // parameter passed in to the n-th dispatch function.
0168 #define BOOST_PARAMETER_FUNCTION_DISPATCH_DEFAULT(n, s_args, tag_ns)         \
0169     ::boost::parameter::keyword<                                             \
0170         tag_ns::BOOST_PARAMETER_FN_ARG_NAME(                                 \
0171             BOOST_PP_SEQ_ELEM(n, BOOST_PARAMETER_SPLIT_ARG_OPT_SEQ(s_args))  \
0172         )                                                                    \
0173     >::instance = BOOST_PARAMETER_FUNCTION_DISPATCH_DEFAULT_AUX(n, s_args)
0174 /**/
0175 
0176 #include <boost/parameter/aux_/preprocessor/impl/function_cast.hpp>
0177 
0178 // Takes in the arg tuple (name, pred) and the tag namespace.
0179 // Extracts the corresponding required argument from the pack.
0180 // This form enables BOOST_PARAMETER_FUNCTION_DISPATCH_LAYER to use it
0181 // from within BOOST_PP_SEQ_FOR_EACH.
0182 #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0183 // The boost::parameter::aux::forward wrapper is necessary to transmit the
0184 // target type to the next dispatch function.  Otherwise, the argument will
0185 // retain its original type. -- Cromwell D. Enage
0186 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_CAST_R(r, tag_ns, arg)         \
0187   , ::boost::parameter::aux::forward<                                        \
0188         BOOST_PARAMETER_FUNCTION_CAST_T(                                     \
0189             tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                         \
0190           , BOOST_PARAMETER_FN_ARG_PRED(arg)                                 \
0191           , Args                                                             \
0192         )                                                                    \
0193       , BOOST_PARAMETER_FUNCTION_CAST_B(                                     \
0194             tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                         \
0195           , BOOST_PARAMETER_FN_ARG_PRED(arg)                                 \
0196           , Args                                                             \
0197         )                                                                    \
0198     >(                                                                       \
0199         args[                                                                \
0200             ::boost::parameter::keyword<                                     \
0201                 tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                     \
0202             >::instance                                                      \
0203         ]                                                                    \
0204     )
0205 /**/
0206 #else   // !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0207 // The explicit type cast is necessary to transmit the target type to the next
0208 // dispatch function.  Otherwise, the argument will retain its original type.
0209 // -- Cromwell D. Enage
0210 #define BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_CAST_R(r, tag_ns, arg)         \
0211   , BOOST_PARAMETER_FUNCTION_CAST_T(                                         \
0212         tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                             \
0213       , BOOST_PARAMETER_FN_ARG_PRED(arg)                                     \
0214       , Args                                                                 \
0215     )(                                                                       \
0216         args[                                                                \
0217             ::boost::parameter::keyword<                                     \
0218                 tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                     \
0219             >::instance                                                      \
0220         ]                                                                    \
0221     )
0222 /**/
0223 #endif  // BOOST_PARAMETER_HAS_PERFECT_FORWARDING
0224 
0225 // Takes in the arg tuple (name, pred, default) and the tag namespace.
0226 // Extracts the corresponding optional argument from the pack if specified,
0227 // otherwise temporarily passes use_default_tag() to the dispatch functions.
0228 #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0229 // The boost::parameter::aux::forward wrapper is necessary to transmit the
0230 // target type to the next dispatch function.  Otherwise, the argument will
0231 // retain its original type. -- Cromwell D. Enage
0232 #define BOOST_PARAMETER_FUNCTION_DISPATCH_OPT_ARG_CAST(arg, tag_ns)          \
0233     ::boost::parameter::aux::forward<                                        \
0234         BOOST_PARAMETER_FUNCTION_CAST_T(                                     \
0235             tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                         \
0236           , BOOST_PARAMETER_FN_ARG_PRED(arg)                                 \
0237           , Args                                                             \
0238         )                                                                    \
0239       , BOOST_PARAMETER_FUNCTION_CAST_B(                                     \
0240             tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                         \
0241           , BOOST_PARAMETER_FN_ARG_PRED(arg)                                 \
0242           , Args                                                             \
0243         )                                                                    \
0244     >(                                                                       \
0245         args[                                                                \
0246             ::boost::parameter::keyword<                                     \
0247                 tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                     \
0248             >::instance || ::boost::parameter::aux::use_default_tag()        \
0249         ]                                                                    \
0250     )
0251 /**/
0252 #else   // !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0253 #define BOOST_PARAMETER_FUNCTION_DISPATCH_OPT_ARG_CAST(arg, tag_ns)          \
0254     BOOST_PARAMETER_FUNCTION_CAST_B(                                         \
0255         args[                                                                \
0256             ::boost::parameter::keyword<                                     \
0257                 tag_ns::BOOST_PARAMETER_FN_ARG_NAME(arg)                     \
0258             >::instance || ::boost::parameter::aux::use_default_tag()        \
0259         ]                                                                    \
0260       , BOOST_PARAMETER_FN_ARG_PRED(arg)                                     \
0261       , Args                                                                 \
0262     )
0263 /**/
0264 #endif  // BOOST_PARAMETER_HAS_PERFECT_FORWARDING
0265 
0266 #include <boost/parameter/aux_/preprocessor/nullptr.hpp>
0267 
0268 // Expands to three dispatch functions that take in all required parameters
0269 // and the first n optional parameters.  The third dispatch function bears
0270 // the same name as the first but takes in use_default_tag as the last
0271 // parameter.  The second dispatch function bears a different name from the
0272 // other two.
0273 //
0274 // x is a tuple:
0275 //
0276 //   (name, split_args, is_const, tag_namespace)
0277 //
0278 // Where name is the base name of the functions, and split_args is a tuple:
0279 //
0280 //   (required_count, required_args, optional_count, required_args)
0281 //
0282 // The first dispatch function queries args if it has bound the (n + 1)th
0283 // optional parameter to a user-defined argument.  If so, then it forwards
0284 // its own arguments followed by the user-defined argument to the dispatch
0285 // function that takes in all required parameters and the first (n + 1)
0286 // optional parameters, but not use_default_tag.   Otherwise, it forwards
0287 // its own arguments to the third dispatch function.
0288 //
0289 // The third dispatch function appends the default value of the (n + 1)th
0290 // optional parameter to its copy of args.  Then it forwards this copy, all
0291 // required parameters, and the first n (not n + 1) optional parameters to
0292 // the second dispatch function.
0293 //
0294 // The second dispatch function forwards its arguments, then the (n + 1)th
0295 // optional parameter that it extracts from args, to the other-named dispatch
0296 // function that takes in all required parameters and the first (n + 1)
0297 // optional parameters, but not use_default_tag.
0298 #define BOOST_PARAMETER_FUNCTION_DISPATCH_OVERLOAD_Z(z, n, x)                \
0299     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(n, x)                         \
0300     inline BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(n, x, 0, 0)            \
0301     {                                                                        \
0302         return BOOST_PP_EXPR_IF(                                             \
0303             BOOST_PARAMETER_FUNCTION_DISPATCH_IS_MEMBER(x)                   \
0304           , this->                                                           \
0305         ) BOOST_PARAMETER_FUNCTION_DISPATCH_NAME(x, 0)(                      \
0306             static_cast<ResultType(*)()>(BOOST_PARAMETER_AUX_PP_NULLPTR)     \
0307           , args                                                             \
0308           , 0L                                                               \
0309             BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_REPEAT(                    \
0310                 BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_FWD                    \
0311               , n                                                            \
0312               , BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)              \
0313             )                                                                \
0314           , BOOST_PARAMETER_FUNCTION_DISPATCH_OPT_ARG_CAST(                  \
0315                 BOOST_PP_SEQ_ELEM(                                           \
0316                     n                                                        \
0317                   , BOOST_PARAMETER_SPLIT_ARG_OPT_SEQ(                       \
0318                         BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)      \
0319                     )                                                        \
0320                 )                                                            \
0321               , BOOST_PARAMETER_FUNCTION_DISPATCH_TAG_NAMESPACE(x)           \
0322             )                                                                \
0323         );                                                                   \
0324     }                                                                        \
0325     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(n, x)                         \
0326     inline BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(n, x, 1, 0)            \
0327     {                                                                        \
0328         return BOOST_PP_EXPR_IF(                                             \
0329             BOOST_PARAMETER_FUNCTION_DISPATCH_IS_MEMBER(x)                   \
0330           , this->                                                           \
0331         ) BOOST_PARAMETER_FUNCTION_DISPATCH_NAME(x, 0)(                      \
0332             static_cast<ResultType(*)()>(BOOST_PARAMETER_AUX_PP_NULLPTR)     \
0333           , args                                                             \
0334           , 0L                                                               \
0335             BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_REPEAT(                    \
0336                 BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_FWD                    \
0337               , n                                                            \
0338               , BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)              \
0339             )                                                                \
0340           , args[                                                            \
0341                 ::boost::parameter::keyword<                                 \
0342                     BOOST_PARAMETER_FUNCTION_DISPATCH_TAG_NAMESPACE(x)::     \
0343                     BOOST_PARAMETER_FN_ARG_NAME(                             \
0344                         BOOST_PP_SEQ_ELEM(                                   \
0345                             n                                                \
0346                           , BOOST_PARAMETER_SPLIT_ARG_OPT_SEQ(               \
0347                             BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)  \
0348                             )                                                \
0349                         )                                                    \
0350                     )                                                        \
0351                 >::instance                                                  \
0352             ]                                                                \
0353         );                                                                   \
0354     }                                                                        \
0355     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(n, x)                         \
0356     inline BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(n, x, 0, 1)            \
0357     {                                                                        \
0358         return BOOST_PP_EXPR_IF(                                             \
0359             BOOST_PARAMETER_FUNCTION_DISPATCH_IS_MEMBER(x)                   \
0360           , this->                                                           \
0361         ) BOOST_PARAMETER_FUNCTION_DISPATCH_NAME(x, 1)(                      \
0362             static_cast<ResultType(*)()>(BOOST_PARAMETER_AUX_PP_NULLPTR)     \
0363           , (args                                                            \
0364               , BOOST_PARAMETER_FUNCTION_DISPATCH_DEFAULT(                   \
0365                     n                                                        \
0366                   , BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)          \
0367                   , BOOST_PARAMETER_FUNCTION_DISPATCH_TAG_NAMESPACE(x)       \
0368                 )                                                            \
0369             )                                                                \
0370           , 0L                                                               \
0371             BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_REPEAT(                    \
0372                 BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_FWD                    \
0373               , n                                                            \
0374               , BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)              \
0375             )                                                                \
0376         );                                                                   \
0377     }
0378 /**/
0379 
0380 #include <boost/preprocessor/arithmetic/inc.hpp>
0381 #include <boost/preprocessor/control/if.hpp>
0382 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
0383 #include <boost/preprocessor/tuple/eat.hpp>
0384 
0385 // x is a tuple:
0386 //
0387 //   (base_name, split_args, is_member, is_const, tag_namespace)
0388 //
0389 // Generates all dispatch functions for the function named base_name.  Each
0390 // dispatch function that takes in n optional parameters passes the default
0391 // value of the (n + 1)th optional parameter to the next dispatch function.
0392 // The last dispatch function is the back-end implementation, so only the
0393 // header is generated: the user is expected to supply the body.
0394 //
0395 // Also generates the front-end implementation function, which uses
0396 // BOOST_PARAMETER_FUNCTION_CAST to extract each argument from the argument
0397 // pack.
0398 #define BOOST_PARAMETER_FUNCTION_DISPATCH_LAYER(fwd_decl, x)                 \
0399     BOOST_PP_IF(fwd_decl, BOOST_PP_REPEAT_FROM_TO, BOOST_PP_TUPLE_EAT(4))(   \
0400         0                                                                    \
0401       , BOOST_PP_INC(                                                        \
0402             BOOST_PARAMETER_SPLIT_ARG_OPT_COUNT(                             \
0403                 BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)              \
0404             )                                                                \
0405         )                                                                    \
0406       , BOOST_PARAMETER_FUNCTION_DISPATCH_FWD_DECL_0_Z                       \
0407       , x                                                                    \
0408     )                                                                        \
0409     BOOST_PP_IF(fwd_decl, BOOST_PP_REPEAT_FROM_TO, BOOST_PP_TUPLE_EAT(4))(   \
0410         0                                                                    \
0411       , BOOST_PARAMETER_SPLIT_ARG_OPT_COUNT(                                 \
0412             BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)                  \
0413         )                                                                    \
0414       , BOOST_PARAMETER_FUNCTION_DISPATCH_FWD_DECL_1_Z                       \
0415       , x                                                                    \
0416     )                                                                        \
0417     template <typename Args> BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(         \
0418         BOOST_PARAMETER_FUNCTION_DISPATCH_BASE_NAME(x)                       \
0419     ) inline typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(                  \
0420         BOOST_PARAMETER_FUNCTION_DISPATCH_BASE_NAME(x)                       \
0421       , BOOST_PARAMETER_FUNCTION_DISPATCH_IS_CONST(x)                        \
0422     )<Args>::type BOOST_PARAMETER_FUNCTION_IMPL_NAME(                        \
0423         BOOST_PARAMETER_FUNCTION_DISPATCH_BASE_NAME(x)                       \
0424       , BOOST_PARAMETER_FUNCTION_DISPATCH_IS_CONST(x)                        \
0425     )(Args const& args)                                                      \
0426     BOOST_PP_EXPR_IF(BOOST_PARAMETER_FUNCTION_DISPATCH_IS_CONST(x), const)   \
0427     {                                                                        \
0428         return BOOST_PP_EXPR_IF(                                             \
0429             BOOST_PARAMETER_FUNCTION_DISPATCH_IS_MEMBER(x)                   \
0430           , this->                                                           \
0431         ) BOOST_PARAMETER_FUNCTION_DISPATCH_NAME(x, 0)(                      \
0432             static_cast<                                                     \
0433                 typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(               \
0434                     BOOST_PARAMETER_FUNCTION_DISPATCH_BASE_NAME(x)           \
0435                   , BOOST_PARAMETER_FUNCTION_DISPATCH_IS_CONST(x)            \
0436                 )<Args>::type(*)()                                           \
0437             >(BOOST_PARAMETER_AUX_PP_NULLPTR)                                \
0438           , args                                                             \
0439           , 0L                                                               \
0440             BOOST_PP_SEQ_FOR_EACH(                                           \
0441                 BOOST_PARAMETER_FUNCTION_DISPATCH_ARG_CAST_R                 \
0442               , BOOST_PARAMETER_FUNCTION_DISPATCH_TAG_NAMESPACE(x)           \
0443               , BOOST_PARAMETER_SPLIT_ARG_REQ_SEQ(                           \
0444                     BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)          \
0445                 )                                                            \
0446             )                                                                \
0447         );                                                                   \
0448     }                                                                        \
0449     BOOST_PP_REPEAT_FROM_TO(                                                 \
0450         0                                                                    \
0451       , BOOST_PARAMETER_SPLIT_ARG_OPT_COUNT(                                 \
0452             BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)                  \
0453         )                                                                    \
0454       , BOOST_PARAMETER_FUNCTION_DISPATCH_OVERLOAD_Z                         \
0455       , x                                                                    \
0456     )                                                                        \
0457     BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_TPL(                              \
0458         BOOST_PARAMETER_SPLIT_ARG_OPT_COUNT(                                 \
0459             BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)                  \
0460         )                                                                    \
0461       , x                                                                    \
0462     )                                                                        \
0463     inline BOOST_PARAMETER_FUNCTION_DISPATCH_HEAD_PRN(                       \
0464         BOOST_PARAMETER_SPLIT_ARG_OPT_COUNT(                                 \
0465             BOOST_PARAMETER_FUNCTION_DISPATCH_SPLIT_ARGS(x)                  \
0466         )                                                                    \
0467       , x                                                                    \
0468       , 0                                                                    \
0469       , 0                                                                    \
0470     )
0471 /**/
0472 
0473 #endif  // include guard
0474