template_arity_helper.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
  2. #include <boost/proto/detail/preprocessed/template_arity_helper.hpp>
  3. #elif !defined(BOOST_PP_IS_ITERATING)
  4. #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
  5. #pragma wave option(preserve: 2, line: 0, output: "preprocessed/template_arity_helper.hpp")
  6. #endif
  7. ///////////////////////////////////////////////////////////////////////////////
  8. // template_arity_helper.hpp
  9. // Overloads of template_arity_helper, used by the template_arity\<\> class template
  10. //
  11. // Copyright 2008 Eric Niebler. Distributed under the Boost
  12. // Software License, Version 1.0. (See accompanying file
  13. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  14. #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
  15. #pragma wave option(preserve: 1)
  16. #endif
  17. #define BOOST_PP_ITERATION_PARAMS_1 \
  18. (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/template_arity_helper.hpp>))
  19. #include BOOST_PP_ITERATE()
  20. #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
  21. #pragma wave option(output: null)
  22. #endif
  23. #else
  24. #define N BOOST_PP_ITERATION()
  25. template<
  26. template<BOOST_PP_ENUM_PARAMS(N, typename P)> class F
  27. , BOOST_PP_ENUM_PARAMS(N, typename T)
  28. >
  29. sized_type<BOOST_PP_INC(N)>::type
  30. template_arity_helper(F<BOOST_PP_ENUM_PARAMS(N, T)> **, mpl::int_<N> *);
  31. #undef N
  32. #endif // BOOST_PROTO_DONT_USE_PREPROCESSED_FILES