config.hpp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. // (C) Copyright John Maddock 2005-7.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
  6. # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
  7. #include <cstddef>
  8. #if (defined(__GNUC__) && !(defined(linux) || defined(__linux) || defined(__linux__))) \
  9. || (!defined(_AIX) && defined(__IBMCPP__) && (__IBMCPP__ >= 800))
  10. // Disable use of #include_next on Linux as typically we are installed in a
  11. // directory that is searched *after* the std lib include path.
  12. #if !defined(BOOST_HAS_INCLUDE_NEXT)
  13. # define BOOST_HAS_INCLUDE_NEXT
  14. #endif
  15. // Need to find out if we're using GLIBC:
  16. #ifdef BOOST_TR1_UTILITY_INCLUDED
  17. // Oops we're in a recursive include path!!
  18. // Need to include utility, or some std lib header,
  19. // but *not* via <utility> or <boost/config/no_tr1/utility.hpp>
  20. # ifndef BOOST_TR1_NO_RECURSION
  21. # define BOOST_TR1_NO_RECURSION
  22. # define BOOST_TR1_NO_CONFIG_RECURSION
  23. # endif
  24. # if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT)
  25. # include_next <utility>
  26. # else
  27. # include BOOST_TR1_STD_HEADER(utility)
  28. # endif
  29. # ifdef BOOST_TR1_NO_CONFIG_RECURSION
  30. # undef BOOST_TR1_NO_CONFIG_RECURSION
  31. # undef BOOST_TR1_NO_RECURSION
  32. # endif
  33. #else
  34. #include <boost/config/no_tr1/utility.hpp>
  35. #endif
  36. #endif
  37. #if defined(__GLIBCXX__) && !defined(BOOST_TR1_PATH)
  38. # define BOOST_TR1_PATH(name) tr1/name
  39. #endif
  40. #if !defined(BOOST_TR1_PATH)
  41. # define BOOST_TR1_PATH(name) name
  42. #endif
  43. #define BOOST_TR1_HEADER(name) <BOOST_TR1_PATH(name)>
  44. // Can't use BOOST_WORKAROUND here, it leads to recursive includes:
  45. #if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || (defined(_MSC_VER) && (_MSC_VER < 1310))
  46. # define BOOST_TR1_USE_OLD_TUPLE
  47. #endif
  48. #ifdef __IBMCPP_TR1__
  49. // turn on support for everything:
  50. # define BOOST_HAS_TR1
  51. #endif
  52. #ifdef __GXX_EXPERIMENTAL_CXX0X__
  53. # define BOOST_HAS_TR1_COMPLEX_OVERLOADS
  54. # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
  55. #endif
  56. #ifdef BOOST_HAS_TR1
  57. // turn on support for everything:
  58. # define BOOST_HAS_TR1_ARRAY
  59. # define BOOST_HAS_TR1_COMPLEX_OVERLOADS
  60. # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
  61. # define BOOST_HAS_TR1_REFERENCE_WRAPPER
  62. # define BOOST_HAS_TR1_RESULT_OF
  63. # define BOOST_HAS_TR1_MEM_FN
  64. # define BOOST_HAS_TR1_BIND
  65. # define BOOST_HAS_TR1_FUNCTION
  66. # define BOOST_HAS_TR1_HASH
  67. # define BOOST_HAS_TR1_SHARED_PTR
  68. # define BOOST_HAS_TR1_RANDOM
  69. # define BOOST_HAS_TR1_REGEX
  70. # define BOOST_HAS_TR1_TUPLE
  71. # define BOOST_HAS_TR1_TYPE_TRAITS
  72. # define BOOST_HAS_TR1_UTILITY
  73. # define BOOST_HAS_TR1_UNORDERED_MAP
  74. # define BOOST_HAS_TR1_UNORDERED_SET
  75. # define BOOST_HAS_TR1_CMATH
  76. #endif
  77. #if defined(__MWERKS__) && (__MWERKS__ >= 0x3205)
  78. //
  79. // Very preliminary MWCW support, may not be right:
  80. //
  81. # define BOOST_HAS_TR1_SHARED_PTR
  82. # define BOOST_HAS_TR1_REFERENCE_WRAPPER
  83. # define BOOST_HAS_TR1_FUNCTION
  84. # define BOOST_HAS_TR1_TUPLE
  85. # define BOOST_HAS_TR1_RESULT_OF
  86. #endif
  87. #ifdef BOOST_HAS_GCC_TR1
  88. // turn on support for everything in gcc 4.0.x:
  89. # define BOOST_HAS_TR1_ARRAY
  90. #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
  91. //# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
  92. # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
  93. #endif
  94. # define BOOST_HAS_TR1_REFERENCE_WRAPPER
  95. # define BOOST_HAS_TR1_RESULT_OF
  96. # define BOOST_HAS_TR1_MEM_FN
  97. # define BOOST_HAS_TR1_BIND
  98. # define BOOST_HAS_TR1_FUNCTION
  99. # define BOOST_HAS_TR1_HASH
  100. # define BOOST_HAS_TR1_SHARED_PTR
  101. #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
  102. # define BOOST_HAS_TR1_RANDOM
  103. //# define BOOST_HAS_TR1_REGEX
  104. #ifdef _GLIBCXX_USE_C99_MATH_TR1
  105. # define BOOST_HAS_TR1_CMATH
  106. #endif
  107. #endif
  108. # define BOOST_HAS_TR1_TUPLE
  109. # define BOOST_HAS_TR1_TYPE_TRAITS
  110. # define BOOST_HAS_TR1_UTILITY
  111. # define BOOST_HAS_TR1_UNORDERED_MAP
  112. # define BOOST_HAS_TR1_UNORDERED_SET
  113. #endif
  114. #if defined(_MSC_VER) && (_MSC_VER >= 1500) \
  115. && defined(_MSC_FULL_VER) && \
  116. !defined(__SGI_STL_PORT) && \
  117. !defined(_STLPORT_VERSION) && \
  118. !defined(_RWSTD_VER_STR) && \
  119. !defined(_RWSTD_VER)
  120. //
  121. // MSVC-9.0 defines a not-quite TR1 conforming hash
  122. // function object in <functional>, so we must define
  123. // this here, in addition the feature pack for VC9
  124. // provides a more or less full TR1 implementation:
  125. //
  126. # if defined(_HAS_TR1) && (_HAS_TR1 + 0)
  127. # define BOOST_HAS_TR1_ARRAY
  128. # define BOOST_HAS_TR1_REFERENCE_WRAPPER
  129. # define BOOST_HAS_TR1_RESULT_OF
  130. # define BOOST_HAS_TR1_MEM_FN
  131. # define BOOST_HAS_TR1_BIND
  132. # define BOOST_HAS_TR1_FUNCTION
  133. # define BOOST_HAS_TR1_HASH
  134. # define BOOST_HAS_TR1_SHARED_PTR
  135. # define BOOST_HAS_TR1_RANDOM
  136. # define BOOST_HAS_TR1_REGEX
  137. # define BOOST_HAS_TR1_TUPLE
  138. # define BOOST_HAS_TR1_TYPE_TRAITS
  139. # define BOOST_HAS_TR1_UTILITY
  140. # define BOOST_HAS_TR1_UNORDERED_MAP
  141. # define BOOST_HAS_TR1_UNORDERED_SET
  142. # else
  143. # define BOOST_HAS_TR1_HASH
  144. # endif
  145. # if _MSC_VER >= 1600
  146. # define BOOST_HAS_CPP_0X
  147. # endif
  148. #endif
  149. #include <boost/config.hpp>
  150. #endif