limits.hpp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # /* Copyright (C) 2001
  2. # * Housemarque Oy
  3. # * http://www.housemarque.com
  4. # *
  5. # * Distributed under the Boost Software License, Version 1.0. (See
  6. # * accompanying file LICENSE_1_0.txt or copy at
  7. # * http://www.boost.org/LICENSE_1_0.txt)
  8. # */
  9. #
  10. # /* Revised by Paul Mensonides (2002) */
  11. # /* Revised by Edward Diener (2011,2020) */
  12. #
  13. # /* See http://www.boost.org for most recent version. */
  14. #
  15. # ifndef BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP
  16. # define BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP
  17. #
  18. # include <boost/preprocessor/config/config.hpp>
  19. #
  20. # if defined(BOOST_PP_LIMIT_DIM)
  21. # undef BOOST_PP_LIMIT_DIM
  22. # endif
  23. # if defined(BOOST_PP_LIMIT_ITERATION_DIM)
  24. # undef BOOST_PP_LIMIT_ITERATION_DIM
  25. # endif
  26. # if defined(BOOST_PP_LIMIT_SLOT_SIG)
  27. # undef BOOST_PP_LIMIT_SLOT_SIG
  28. # endif
  29. # if defined(BOOST_PP_LIMIT_SLOT_COUNT)
  30. # undef BOOST_PP_LIMIT_SLOT_COUNT
  31. # endif
  32. # if defined(BOOST_PP_LIMIT_WHILE)
  33. # undef BOOST_PP_LIMIT_WHILE
  34. # endif
  35. #
  36. # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
  37. #
  38. # if defined(BOOST_PP_LIMIT_MAG)
  39. # undef BOOST_PP_LIMIT_MAG
  40. # endif
  41. # if defined(BOOST_PP_LIMIT_VARIADIC)
  42. # undef BOOST_PP_LIMIT_VARIADIC
  43. # endif
  44. # if defined(BOOST_PP_LIMIT_TUPLE)
  45. # undef BOOST_PP_LIMIT_TUPLE
  46. # endif
  47. # if defined(BOOST_PP_LIMIT_FOR)
  48. # undef BOOST_PP_LIMIT_FOR
  49. # endif
  50. # if defined(BOOST_PP_LIMIT_REPEAT)
  51. # undef BOOST_PP_LIMIT_REPEAT
  52. # endif
  53. # if defined(BOOST_PP_LIMIT_SEQ)
  54. # undef BOOST_PP_LIMIT_SEQ
  55. # endif
  56. # if defined(BOOST_PP_LIMIT_ITERATION)
  57. # undef BOOST_PP_LIMIT_ITERATION
  58. # endif
  59. #
  60. # define BOOST_PP_LIMIT_MAG 256
  61. # define BOOST_PP_LIMIT_WHILE 256
  62. # define BOOST_PP_LIMIT_VARIADIC 64
  63. # define BOOST_PP_LIMIT_TUPLE 64
  64. # define BOOST_PP_LIMIT_FOR 256
  65. # define BOOST_PP_LIMIT_SEQ 256
  66. # define BOOST_PP_LIMIT_REPEAT 256
  67. # define BOOST_PP_LIMIT_ITERATION 256
  68. #
  69. #else
  70. #
  71. # if defined(BOOST_PP_LIMIT_MAG)
  72. # if !(BOOST_PP_LIMIT_MAG == 256 || BOOST_PP_LIMIT_MAG == 512 || BOOST_PP_LIMIT_MAG == 1024)
  73. # undef BOOST_PP_LIMIT_MAG
  74. # define BOOST_PP_LIMIT_MAG 256
  75. # define BOOST_PP_LIMIT_WHILE 256
  76. # else
  77. # define BOOST_PP_LIMIT_WHILE BOOST_PP_LIMIT_MAG
  78. # if !defined(BOOST_PP_LIMIT_SEQ)
  79. # define BOOST_PP_LIMIT_SEQ BOOST_PP_LIMIT_MAG
  80. # endif
  81. # endif
  82. # else
  83. # define BOOST_PP_LIMIT_MAG 256
  84. # define BOOST_PP_LIMIT_WHILE 256
  85. # endif
  86. #
  87. # if defined(BOOST_PP_LIMIT_VARIADIC)
  88. # if !(BOOST_PP_LIMIT_VARIADIC == 64 || BOOST_PP_LIMIT_VARIADIC == 128 || BOOST_PP_LIMIT_VARIADIC == 256)
  89. # undef BOOST_PP_LIMIT_VARIADIC
  90. # define BOOST_PP_LIMIT_VARIADIC 64
  91. # endif
  92. # else
  93. # define BOOST_PP_LIMIT_VARIADIC 64
  94. # endif
  95. #
  96. # if defined(BOOST_PP_LIMIT_TUPLE)
  97. # if !(BOOST_PP_LIMIT_TUPLE == 64 || BOOST_PP_LIMIT_TUPLE == 128 || BOOST_PP_LIMIT_TUPLE == 256)
  98. # undef BOOST_PP_LIMIT_TUPLE
  99. # define BOOST_PP_LIMIT_TUPLE 64
  100. # elif BOOST_PP_LIMIT_TUPLE > BOOST_PP_LIMIT_VARIADIC
  101. # undef BOOST_PP_LIMIT_VARIADIC
  102. # define BOOST_PP_LIMIT_VARIADIC BOOST_PP_LIMIT_TUPLE
  103. # endif
  104. # else
  105. # define BOOST_PP_LIMIT_TUPLE 64
  106. # endif
  107. #
  108. # if defined(BOOST_PP_LIMIT_FOR)
  109. # if !(BOOST_PP_LIMIT_FOR == 256 || BOOST_PP_LIMIT_FOR == 512 || BOOST_PP_LIMIT_FOR == 1024)
  110. # undef BOOST_PP_LIMIT_FOR
  111. # define BOOST_PP_LIMIT_FOR 256
  112. # elif BOOST_PP_LIMIT_FOR > BOOST_PP_LIMIT_MAG
  113. # undef BOOST_PP_LIMIT_FOR
  114. # define BOOST_PP_LIMIT_FOR BOOST_PP_LIMIT_MAG
  115. # endif
  116. # else
  117. # define BOOST_PP_LIMIT_FOR 256
  118. # endif
  119. #
  120. # if defined(BOOST_PP_LIMIT_REPEAT)
  121. # if !(BOOST_PP_LIMIT_REPEAT == 256 || BOOST_PP_LIMIT_REPEAT == 512 || BOOST_PP_LIMIT_REPEAT == 1024)
  122. # undef BOOST_PP_LIMIT_REPEAT
  123. # define BOOST_PP_LIMIT_REPEAT 256
  124. # elif BOOST_PP_LIMIT_REPEAT > BOOST_PP_LIMIT_MAG
  125. # undef BOOST_PP_LIMIT_REPEAT
  126. # define BOOST_PP_LIMIT_REPEAT BOOST_PP_LIMIT_MAG
  127. # endif
  128. # else
  129. # define BOOST_PP_LIMIT_REPEAT 256
  130. # endif
  131. #
  132. # if defined(BOOST_PP_LIMIT_SEQ)
  133. # if !(BOOST_PP_LIMIT_SEQ == 256 || BOOST_PP_LIMIT_SEQ == 512 || BOOST_PP_LIMIT_SEQ == 1024)
  134. # undef BOOST_PP_LIMIT_SEQ
  135. # define BOOST_PP_LIMIT_SEQ 256
  136. # elif BOOST_PP_LIMIT_SEQ > BOOST_PP_LIMIT_MAG
  137. # undef BOOST_PP_LIMIT_SEQ
  138. # define BOOST_PP_LIMIT_SEQ BOOST_PP_LIMIT_MAG
  139. # endif
  140. # else
  141. # define BOOST_PP_LIMIT_SEQ 256
  142. # endif
  143. #
  144. # if defined(BOOST_PP_LIMIT_ITERATION)
  145. # if !(BOOST_PP_LIMIT_ITERATION == 256 || BOOST_PP_LIMIT_ITERATION == 512 || BOOST_PP_LIMIT_ITERATION == 1024)
  146. # undef BOOST_PP_LIMIT_ITERATION
  147. # define BOOST_PP_LIMIT_ITERATION 256
  148. # elif BOOST_PP_LIMIT_ITERATION > BOOST_PP_LIMIT_MAG
  149. # undef BOOST_PP_LIMIT_ITERATION
  150. # define BOOST_PP_LIMIT_ITERATION BOOST_PP_LIMIT_MAG
  151. # endif
  152. # else
  153. # define BOOST_PP_LIMIT_ITERATION 256
  154. # endif
  155. #
  156. # endif
  157. #
  158. # define BOOST_PP_LIMIT_DIM 3
  159. # define BOOST_PP_LIMIT_ITERATION_DIM 3
  160. # define BOOST_PP_LIMIT_SLOT_SIG 10
  161. # define BOOST_PP_LIMIT_SLOT_COUNT 5
  162. #
  163. # endif