config.hpp 5.1 KB

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