numbered_c.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
  2. #if defined(BOOST_PP_IS_ITERATING)
  3. // Copyright Aleksey Gurtovoy 2000-2004
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/mpl for documentation.
  10. // $Id$
  11. // $Date$
  12. // $Revision$
  13. #include <boost/preprocessor/repetition/enum_params.hpp>
  14. #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
  15. #include <boost/preprocessor/dec.hpp>
  16. #include <boost/preprocessor/cat.hpp>
  17. #define i_ BOOST_PP_FRAME_ITERATION(1)
  18. # define AUX778076_SET_C_TAIL(set, i_, T, C) \
  19. BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)< \
  20. T BOOST_PP_ENUM_TRAILING_PARAMS(i_, C) \
  21. > \
  22. /**/
  23. template<
  24. typename T
  25. , BOOST_PP_ENUM_PARAMS(i_, T C)
  26. >
  27. struct BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)
  28. : s_item<
  29. integral_c<T,BOOST_PP_CAT(C,BOOST_PP_DEC(i_))>
  30. , AUX778076_SET_C_TAIL(set,BOOST_PP_DEC(i_), T, C)
  31. >
  32. {
  33. typedef BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c) type;
  34. };
  35. # undef AUX778076_SET_C_TAIL
  36. #undef i_
  37. #endif // BOOST_PP_IS_ITERATING