| 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) |
| 5 | |
| 6 | #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_FUNCTION_FORWARD_MATCH_HPP |
| 7 | #define BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_FUNCTION_FORWARD_MATCH_HPP |
| 8 | |
| 9 | #include <boost/parameter/config.hpp> |
| 10 | |
| 11 | #if !defined(BOOST_NO_SFINAE) && \ |
| 12 | !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592)) |
| 13 | |
| 14 | #include <boost/parameter/aux_/pp_impl/match.hpp> |
| 15 | #include <boost/preprocessor/repetition/enum_trailing_params.hpp> |
| 16 | |
| 17 | // Expands to an extra argument that is well-formed |
| 18 | // iff all Args... satisfy the requirements set by params. |
| 19 | #define BOOST_PARAMETER_FUNCTION_FORWARD_MATCH(params, n, prefix) \ |
| 20 | , typename ::boost::parameter::aux::match< \ |
| 21 | params BOOST_PP_ENUM_TRAILING_PARAMS(n, prefix) \ |
| 22 | >::type = params() |
| 23 | /**/ |
| 24 | |
| 25 | #define BOOST_PARAMETER_FUNCTION_FORWARD_MATCH_Z(z, params, n, prefix) \ |
| 26 | , typename ::boost::parameter::aux::match< \ |
| 27 | params BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, prefix) \ |
| 28 | >::type = params() |
| 29 | /**/ |
| 30 | |
| 31 | #else // SFINAE/Borland workarounds needed. |
| 32 | |
| 33 | #define BOOST_PARAMETER_FUNCTION_FORWARD_MATCH(params, n, prefix) \ |
| 34 | , params = params() |
| 35 | /**/ |
| 36 | |
| 37 | #define BOOST_PARAMETER_FUNCTION_FORWARD_MATCH_Z(z, params, n, prefix) \ |
| 38 | , params = params() |
| 39 | /**/ |
| 40 | |
| 41 | #endif |
| 42 | #endif // include guard |
| 43 | |
| 44 | |