/Src/Dependencies/Boost/boost/mpl/set/aux_/numbered_c.hpp

http://hadesmem.googlecode.com/ · C++ Header · 48 lines · 25 code · 11 blank · 12 comment · 0 complexity · ecbf45dacb284973b3266c8bbeb6695e MD5 · raw file

  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: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
  11. // $Date: 2008-10-11 17:19:02 +1100 (Sat, 11 Oct 2008) $
  12. // $Revision: 49267 $
  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