function_forward_match.hpp 1.5 KB

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