numbered.hpp 1.1 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/enum_params.hpp>
  14. #include <boost/preprocessor/dec.hpp>
  15. #include <boost/preprocessor/cat.hpp>
  16. #define i_ BOOST_PP_FRAME_ITERATION(1)
  17. # define AUX778076_SET_TAIL(set, i_, T) \
  18. typename BOOST_PP_CAT(set,i_)< \
  19. BOOST_PP_ENUM_PARAMS(i_, T) \
  20. >::item_ \
  21. /**/
  22. #if i_ > 0
  23. template<
  24. BOOST_PP_ENUM_PARAMS(i_, typename T)
  25. >
  26. struct BOOST_PP_CAT(set,i_)
  27. : s_item<
  28. BOOST_PP_CAT(T,BOOST_PP_DEC(i_))
  29. , AUX778076_SET_TAIL(set,BOOST_PP_DEC(i_),T)
  30. >
  31. {
  32. typedef BOOST_PP_CAT(set,i_) type;
  33. };
  34. #endif
  35. # undef AUX778076_SET_TAIL
  36. #undef i_
  37. #endif // BOOST_PP_IS_ITERATING