| 1 | // Copyright Daniel Wallin 2006. |
| 2 | // Copyright Cromwell D. Enage 2017. |
| 3 | // Distributed under the Boost Software License, Version 1.0. |
| 4 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 5 | // http://www.boost.org/LICENSE_1_0.txt) |
| 6 | |
| 7 | #ifndef BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP |
| 8 | #define BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP |
| 9 | |
| 10 | #include <boost/parameter/config.hpp> |
| 11 | |
| 12 | #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) |
| 13 | |
| 14 | namespace boost { namespace parameter { namespace aux { |
| 15 | |
| 16 | // Recast the ParameterSpec's nested match metafunction |
| 17 | // as a free metafunction. |
| 18 | // |
| 19 | // No more limits set by BOOST_PARAMETER_MAX_ARITY. -- Cromwell D. Enage |
| 20 | template <typename Parameters, typename ...Args> |
| 21 | struct match : Parameters::BOOST_NESTED_TEMPLATE match<Args...> |
| 22 | { |
| 23 | }; |
| 24 | }}} // namespace boost::parameter::aux |
| 25 | |
| 26 | #else |
| 27 | |
| 28 | #include <boost/parameter/aux_/void.hpp> |
| 29 | #include <boost/preprocessor/facilities/intercept.hpp> |
| 30 | #include <boost/preprocessor/repetition/enum_params.hpp> |
| 31 | #include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp> |
| 32 | |
| 33 | namespace boost { namespace parameter { namespace aux { |
| 34 | |
| 35 | // Recast the ParameterSpec's nested match metafunction |
| 36 | // as a free metafunction. |
| 37 | template < |
| 38 | typename Parameters |
| 39 | BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( |
| 40 | BOOST_PARAMETER_MAX_ARITY |
| 41 | , typename A |
| 42 | , = ::boost::parameter::void_ BOOST_PP_INTERCEPT |
| 43 | ) |
| 44 | > |
| 45 | struct match |
| 46 | : Parameters::BOOST_NESTED_TEMPLATE match< |
| 47 | BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, A) |
| 48 | > |
| 49 | { |
| 50 | }; |
| 51 | }}} // namespace boost::parameter::aux |
| 52 | |
| 53 | #endif // BOOST_PARAMETER_HAS_PERFECT_FORWARDING |
| 54 | #endif // include guard |
| 55 | |
| 56 | |