preprocessed_arg_type_template.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright Frank Mori Hess 2009
  2. //
  3. // Use, modification and
  4. // distribution is subject to the Boost Software License, Version
  5. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. // For more information, see http://www.boost.org
  8. // This file is included iteratively, and should not be protected from multiple inclusion
  9. #define BOOST_SIGNALS2_NUM_ARGS BOOST_PP_ITERATION()
  10. namespace boost
  11. {
  12. namespace signals2
  13. {
  14. namespace detail
  15. {
  16. template<unsigned n BOOST_PP_COMMA_IF(BOOST_SIGNALS2_NUM_ARGS)
  17. BOOST_SIGNALS2_ARGS_TEMPLATE_DECL(BOOST_SIGNALS2_NUM_ARGS)>
  18. class BOOST_SIGNALS2_PREPROCESSED_ARG_N_TYPE_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS);
  19. // template<typename T1, typename T2, ... , typename TN> class preprocessed_arg_typeN<n, T1, T2, ..., TN>{...} ...
  20. #define BOOST_SIGNALS2_PREPROCESSED_ARG_TYPE_CLASS_TEMPLATE_SPECIALIZATION(z, n, data) \
  21. template<BOOST_SIGNALS2_ARGS_TEMPLATE_DECL(BOOST_SIGNALS2_NUM_ARGS)> \
  22. class BOOST_SIGNALS2_PREPROCESSED_ARG_N_TYPE_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)<n, \
  23. BOOST_SIGNALS2_ARGS_TEMPLATE_INSTANTIATION(BOOST_SIGNALS2_NUM_ARGS)> \
  24. { \
  25. public: \
  26. typedef BOOST_PP_CAT(T, BOOST_PP_INC(n)) type; \
  27. };
  28. BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_PREPROCESSED_ARG_TYPE_CLASS_TEMPLATE_SPECIALIZATION, ~)
  29. } // namespace detail
  30. } // namespace signals2
  31. } // namespace boost
  32. #undef BOOST_SIGNALS2_NUM_ARGS