sgi.hpp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. // (C) Copyright John Maddock 2001 - 2003.
  2. // (C) Copyright Darin Adler 2001.
  3. // (C) Copyright Jens Maurer 2001 - 2003.
  4. // Use, modification and distribution are subject to the
  5. // Boost Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org for most recent version.
  8. // generic SGI STL:
  9. #if !defined(__STL_CONFIG_H)
  10. # include <boost/config/no_tr1/utility.hpp>
  11. # if !defined(__STL_CONFIG_H)
  12. # error "This is not the SGI STL!"
  13. # endif
  14. #endif
  15. //
  16. // No std::iterator traits without partial specialisation:
  17. //
  18. #if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION)
  19. # define BOOST_NO_STD_ITERATOR_TRAITS
  20. #endif
  21. //
  22. // No std::stringstream with gcc < 3
  23. //
  24. #if defined(__GNUC__) && (__GNUC__ < 3) && \
  25. ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \
  26. !defined(__STL_USE_NEW_IOSTREAMS) || \
  27. defined(__APPLE_CC__)
  28. // Note that we only set this for GNU C++ prior to 2.95 since the
  29. // latest patches for that release do contain a minimal <sstream>
  30. // If you are running a 2.95 release prior to 2.95.3 then this will need
  31. // setting, but there is no way to detect that automatically (other
  32. // than by running the configure script).
  33. // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't
  34. // have <sstream>.
  35. # define BOOST_NO_STRINGSTREAM
  36. #endif
  37. // Apple doesn't seem to reliably defined a *unix* macro
  38. #if !defined(CYGWIN) && ( defined(__unix__) \
  39. || defined(__unix) \
  40. || defined(unix) \
  41. || defined(__APPLE__) \
  42. || defined(__APPLE) \
  43. || defined(APPLE))
  44. # include <unistd.h>
  45. #endif
  46. //
  47. // Assume no std::locale without own iostreams (this may be an
  48. // incorrect assumption in some cases):
  49. //
  50. #if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS)
  51. # define BOOST_NO_STD_LOCALE
  52. #endif
  53. //
  54. // Original native SGI streams have non-standard std::messages facet:
  55. //
  56. #if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS)
  57. # define BOOST_NO_STD_LOCALE
  58. #endif
  59. //
  60. // SGI's new iostreams have missing "const" in messages<>::open
  61. //
  62. #if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS)
  63. # define BOOST_NO_STD_MESSAGES
  64. #endif
  65. //
  66. // No template iterator constructors, or std::allocator
  67. // without member templates:
  68. //
  69. #if !defined(__STL_MEMBER_TEMPLATES)
  70. # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
  71. # define BOOST_NO_STD_ALLOCATOR
  72. #endif
  73. //
  74. // We always have SGI style hash_set, hash_map, and slist:
  75. //
  76. #define BOOST_HAS_HASH
  77. #define BOOST_HAS_SLIST
  78. //
  79. // If this is GNU libstdc++2, then no <limits> and no std::wstring:
  80. //
  81. #if (defined(__GNUC__) && (__GNUC__ < 3))
  82. # include <string>
  83. # if defined(__BASTRING__)
  84. # define BOOST_NO_LIMITS
  85. // Note: <boost/limits.hpp> will provide compile-time constants
  86. # undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
  87. # define BOOST_NO_STD_WSTRING
  88. # endif
  89. #endif
  90. //
  91. // There is no standard iterator unless we have namespace support:
  92. //
  93. #if !defined(__STL_USE_NAMESPACES)
  94. # define BOOST_NO_STD_ITERATOR
  95. #endif
  96. //
  97. // Intrinsic type_traits support.
  98. // The SGI STL has it's own __type_traits class, which
  99. // has intrinsic compiler support with SGI's compilers.
  100. // Whatever map SGI style type traits to boost equivalents:
  101. //
  102. #define BOOST_HAS_SGI_TYPE_TRAITS
  103. // C++0x headers not yet implemented
  104. //
  105. # define BOOST_NO_CXX11_HDR_ARRAY
  106. # define BOOST_NO_CXX11_HDR_CHRONO
  107. # define BOOST_NO_CXX11_HDR_CODECVT
  108. # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
  109. # define BOOST_NO_CXX11_HDR_FORWARD_LIST
  110. # define BOOST_NO_CXX11_HDR_FUTURE
  111. # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
  112. # define BOOST_NO_CXX11_HDR_MUTEX
  113. # define BOOST_NO_CXX11_HDR_RANDOM
  114. # define BOOST_NO_CXX11_HDR_RATIO
  115. # define BOOST_NO_CXX11_HDR_REGEX
  116. # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
  117. # define BOOST_NO_CXX11_HDR_THREAD
  118. # define BOOST_NO_CXX11_HDR_TUPLE
  119. # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
  120. # define BOOST_NO_CXX11_HDR_TYPEINDEX
  121. # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
  122. # define BOOST_NO_CXX11_HDR_UNORDERED_SET
  123. # define BOOST_NO_CXX11_NUMERIC_LIMITS
  124. # define BOOST_NO_CXX11_ALLOCATOR
  125. # define BOOST_NO_CXX11_POINTER_TRAITS
  126. # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
  127. # define BOOST_NO_CXX11_SMART_PTR
  128. # define BOOST_NO_CXX11_HDR_FUNCTIONAL
  129. # define BOOST_NO_CXX11_HDR_ATOMIC
  130. # define BOOST_NO_CXX11_STD_ALIGN
  131. # define BOOST_NO_CXX11_ADDRESSOF
  132. # define BOOST_NO_CXX11_HDR_EXCEPTION
  133. #if defined(__has_include)
  134. #if !__has_include(<shared_mutex>)
  135. # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
  136. #elif __cplusplus < 201402
  137. # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
  138. #endif
  139. #else
  140. # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
  141. #endif
  142. // C++14 features
  143. # define BOOST_NO_CXX14_STD_EXCHANGE
  144. // C++17 features
  145. # define BOOST_NO_CXX17_STD_APPLY
  146. # define BOOST_NO_CXX17_STD_INVOKE
  147. # define BOOST_NO_CXX17_ITERATOR_TRAITS
  148. #define BOOST_STDLIB "SGI standard library"