File indexing completed on 2025-01-18 09:43:30
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_HPP
0007 #define BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_HPP
0008
0009 #include <boost/parameter/config.hpp>
0010
0011 #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
0012
0013 namespace boost { namespace parameter {
0014
0015 template <typename TaggedArg0, typename ...TaggedArgs>
0016 struct are_tagged_arguments;
0017 }}
0018
0019 #include <boost/parameter/aux_/is_tagged_argument.hpp>
0020
0021 namespace boost { namespace parameter {
0022
0023 template <typename TaggedArg0>
0024 struct are_tagged_arguments<TaggedArg0>
0025 : ::boost::parameter::aux::is_tagged_argument<TaggedArg0>
0026 {
0027 };
0028 }}
0029
0030 #include <boost/mpl/bool.hpp>
0031 #include <boost/mpl/if.hpp>
0032
0033 namespace boost { namespace parameter {
0034
0035 template <typename TaggedArg0, typename ...TaggedArgs>
0036 struct are_tagged_arguments
0037 : ::boost::mpl::if_<
0038 ::boost::parameter::aux::is_tagged_argument<TaggedArg0>
0039 , ::boost::parameter::are_tagged_arguments<TaggedArgs...>
0040 , ::boost::mpl::false_
0041 >::type
0042 {
0043 };
0044 }}
0045
0046 #else
0047
0048 #define BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_END_Z(z, n, false_t) , false_t>
0049
0050
0051 #include <boost/parameter/aux_/is_tagged_argument.hpp>
0052 #include <boost/mpl/eval_if.hpp>
0053 #include <boost/preprocessor/cat.hpp>
0054
0055 #define BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_BEGIN_Z(z, n, prefix) \
0056 ::boost::mpl::eval_if< \
0057 ::boost::parameter::aux::is_tagged_argument<BOOST_PP_CAT(prefix, n)>,
0058
0059
0060 #include <boost/parameter/aux_/void.hpp>
0061 #include <boost/mpl/bool.hpp>
0062 #include <boost/preprocessor/arithmetic/sub.hpp>
0063 #include <boost/preprocessor/facilities/intercept.hpp>
0064 #include <boost/preprocessor/repetition/repeat.hpp>
0065 #include <boost/preprocessor/repetition/enum_params.hpp>
0066 #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
0067
0068 #define BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_OVERLOADS_Z(z, n, prefix) \
0069 template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename prefix)> \
0070 struct are_tagged_arguments< \
0071 BOOST_PP_ENUM_PARAMS_Z(z, n, prefix) \
0072 BOOST_PP_ENUM_TRAILING_PARAMS_Z( \
0073 z \
0074 , BOOST_PP_SUB(BOOST_PARAMETER_COMPOSE_MAX_ARITY, n) \
0075 , ::boost::parameter::void_ BOOST_PP_INTERCEPT \
0076 ) \
0077 > : BOOST_PP_CAT(BOOST_PP_REPEAT_, z)( \
0078 n \
0079 , BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_BEGIN_Z \
0080 , prefix \
0081 ) \
0082 ::boost::mpl::true_ \
0083 BOOST_PP_CAT(BOOST_PP_REPEAT_, z)( \
0084 n \
0085 , BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_END_Z \
0086 , ::boost::mpl::false_ \
0087 )::type \
0088 { \
0089 };
0090
0091
0092 #include <boost/preprocessor/arithmetic/inc.hpp>
0093 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0094
0095 namespace boost { namespace parameter {
0096
0097 template <
0098 BOOST_PP_ENUM_BINARY_PARAMS(
0099 BOOST_PP_INC(BOOST_PARAMETER_COMPOSE_MAX_ARITY)
0100 , typename TaggedArg
0101 , = ::boost::parameter::void_ BOOST_PP_INTERCEPT
0102 )
0103 >
0104 struct are_tagged_arguments;
0105 }}
0106
0107 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
0108
0109 namespace boost { namespace parameter {
0110
0111 BOOST_PP_REPEAT_FROM_TO(
0112 1
0113 , BOOST_PP_INC(BOOST_PARAMETER_COMPOSE_MAX_ARITY)
0114 , BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_OVERLOADS_Z
0115 , TaggedArg
0116 )
0117 }}
0118
0119 #undef BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_OVERLOADS_Z
0120 #undef BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_BEGIN_Z
0121 #undef BOOST_PARAMETER_ARE_TAGGED_ARGUMENTS_END_Z
0122
0123 #endif
0124 #endif
0125