sub.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED
  2. #define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED
  3. // Copyright Aleksey Gurtovoy 2002-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/mpl/aux_/config/preprocessor.hpp>
  14. #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
  15. # include <boost/mpl/aux_/preprocessor/tuple.hpp>
  16. #if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION)
  17. # include <boost/preprocessor/cat.hpp>
  18. # define BOOST_MPL_PP_SUB(i,j) \
  19. BOOST_MPL_PP_SUB_DELAY(i,j) \
  20. /**/
  21. # define BOOST_MPL_PP_SUB_DELAY(i,j) \
  22. BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_SUB_##j) \
  23. /**/
  24. #else
  25. # define BOOST_MPL_PP_SUB(i,j) \
  26. BOOST_MPL_PP_SUB_DELAY(i,j) \
  27. /**/
  28. # define BOOST_MPL_PP_SUB_DELAY(i,j) \
  29. BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \
  30. /**/
  31. #endif
  32. # define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10)
  33. # define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9)
  34. # define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8)
  35. # define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7)
  36. # define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6)
  37. # define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5)
  38. # define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4)
  39. # define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3)
  40. # define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2)
  41. # define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1)
  42. # define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0)
  43. #else
  44. # include <boost/preprocessor/arithmetic/sub.hpp>
  45. # define BOOST_MPL_PP_SUB(i,j) \
  46. BOOST_PP_SUB(i,j) \
  47. /**/
  48. #endif
  49. #endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED