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)
6 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_SPECIFICATION_HPP
7 #define BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_SPECIFICATION_HPP
9 #include <boost/parameter/optional.hpp>
11 // Helper macros for BOOST_PARAMETER_SPECIFICATION_ELEM_R.
12 #define BOOST_PARAMETER_QUALIFIED_TAG_optional(tag) \
16 #include <boost/parameter/required.hpp>
18 #define BOOST_PARAMETER_QUALIFIED_TAG_required(tag) \
22 #include <boost/parameter/deduced.hpp>
24 #define BOOST_PARAMETER_QUALIFIED_TAG_deduced_optional(tag) \
25 optional< ::boost::parameter::deduced<tag>
28 #define BOOST_PARAMETER_QUALIFIED_TAG_deduced_required(tag) \
29 required< ::boost::parameter::deduced<tag>
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>
37 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
39 #include <boost/parameter/aux_/use_default.hpp>
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 \
50 #else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
52 #include <boost/parameter/aux_/pp_impl/unwrap_predicate.hpp>
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) \
66 #endif // Borland workarounds needed.
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>
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( \
82 , boost_param_params_const_ \
83 , boost_param_params_ \
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 \
95 typedef BOOST_PP_CAT( \
99 , boost_param_params_const_ \
100 , boost_param_params_ \
104 , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \
108 #endif // include guard