roguewave.hpp 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. // (C) Copyright John Maddock 2001 - 2003.
  2. // (C) Copyright Jens Maurer 2001.
  3. // (C) Copyright David Abrahams 2003.
  4. // (C) Copyright Boris Gubenko 2007.
  5. // Use, modification and distribution are subject to the
  6. // Boost Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. // See http://www.boost.org for most recent version.
  9. // Rogue Wave std lib:
  10. #define BOOST_RW_STDLIB 1
  11. #if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
  12. # include <boost/config/no_tr1/utility.hpp>
  13. # if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
  14. # error This is not the Rogue Wave standard library
  15. # endif
  16. #endif
  17. //
  18. // figure out a consistent version number:
  19. //
  20. #ifndef _RWSTD_VER
  21. # define BOOST_RWSTD_VER 0x010000
  22. #elif _RWSTD_VER < 0x010000
  23. # define BOOST_RWSTD_VER (_RWSTD_VER << 8)
  24. #else
  25. # define BOOST_RWSTD_VER _RWSTD_VER
  26. #endif
  27. #ifndef _RWSTD_VER
  28. # define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)"
  29. #elif _RWSTD_VER < 0x04010200
  30. # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER)
  31. #else
  32. # ifdef _RWSTD_VER_STR
  33. # define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR
  34. # else
  35. # define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER)
  36. # endif
  37. #endif
  38. //
  39. // Prior to version 2.2.0 the primary template for std::numeric_limits
  40. // does not have compile time constants, even though specializations of that
  41. // template do:
  42. //
  43. #if BOOST_RWSTD_VER < 0x020200
  44. # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
  45. #endif
  46. // Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the
  47. // library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817):
  48. #if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550))
  49. # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
  50. # endif
  51. //
  52. // Borland version of numeric_limits lacks __int64 specialisation:
  53. //
  54. #ifdef __BORLANDC__
  55. # define BOOST_NO_MS_INT64_NUMERIC_LIMITS
  56. #endif
  57. //
  58. // No std::iterator if it can't figure out default template args:
  59. //
  60. #if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000)
  61. # define BOOST_NO_STD_ITERATOR
  62. #endif
  63. //
  64. // No iterator traits without partial specialization:
  65. //
  66. #if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC)
  67. # define BOOST_NO_STD_ITERATOR_TRAITS
  68. #endif
  69. //
  70. // Prior to version 2.0, std::auto_ptr was buggy, and there were no
  71. // new-style iostreams, and no conformant std::allocator:
  72. //
  73. #if (BOOST_RWSTD_VER < 0x020000)
  74. # define BOOST_NO_AUTO_PTR
  75. # define BOOST_NO_STRINGSTREAM
  76. # define BOOST_NO_STD_ALLOCATOR
  77. # define BOOST_NO_STD_LOCALE
  78. #endif
  79. //
  80. // No template iterator constructors without member template support:
  81. //
  82. #if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES)
  83. # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
  84. #endif
  85. //
  86. // RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use
  87. // (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR
  88. // on HP aCC systems even though the allocator is in fact broken):
  89. //
  90. #if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100)
  91. # define BOOST_NO_STD_ALLOCATOR
  92. #endif
  93. //
  94. // If we have a std::locale, we still may not have std::use_facet:
  95. //
  96. #if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE)
  97. # define BOOST_NO_STD_USE_FACET
  98. # define BOOST_HAS_TWO_ARG_USE_FACET
  99. #endif
  100. //
  101. // There's no std::distance prior to version 2, or without
  102. // partial specialization support:
  103. //
  104. #if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
  105. #define BOOST_NO_STD_DISTANCE
  106. #endif
  107. //
  108. // Some versions of the rogue wave library don't have assignable
  109. // OutputIterators:
  110. //
  111. #if BOOST_RWSTD_VER < 0x020100
  112. # define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
  113. #endif
  114. //
  115. // Disable BOOST_HAS_LONG_LONG when the library has no support for it.
  116. //
  117. #if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)
  118. # undef BOOST_HAS_LONG_LONG
  119. #endif
  120. //
  121. // check that on HP-UX, the proper RW library is used
  122. //
  123. #if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD)
  124. # error "Boost requires Standard RW library. Please compile and link with -AA"
  125. #endif
  126. //
  127. // Define macros specific to RW V2.2 on HP-UX
  128. //
  129. #if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100)
  130. # ifndef __HP_TC1_MAKE_PAIR
  131. # define __HP_TC1_MAKE_PAIR
  132. # endif
  133. # ifndef _HP_INSTANTIATE_STD2_VL
  134. # define _HP_INSTANTIATE_STD2_VL
  135. # endif
  136. #endif
  137. #if _RWSTD_VER < 0x05000000
  138. # define BOOST_NO_CXX11_HDR_ARRAY
  139. #endif
  140. // type_traits header is incomplete:
  141. # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
  142. //
  143. // C++0x headers not yet implemented
  144. //
  145. # define BOOST_NO_CXX11_HDR_CHRONO
  146. # define BOOST_NO_CXX11_HDR_CODECVT
  147. # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
  148. # define BOOST_NO_CXX11_HDR_FORWARD_LIST
  149. # define BOOST_NO_CXX11_HDR_FUTURE
  150. # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
  151. # define BOOST_NO_CXX11_HDR_MUTEX
  152. # define BOOST_NO_CXX11_HDR_RANDOM
  153. # define BOOST_NO_CXX11_HDR_RATIO
  154. # define BOOST_NO_CXX11_HDR_REGEX
  155. # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
  156. # define BOOST_NO_CXX11_HDR_THREAD
  157. # define BOOST_NO_CXX11_HDR_TUPLE
  158. # define BOOST_NO_CXX11_HDR_TYPEINDEX
  159. # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
  160. # define BOOST_NO_CXX11_HDR_UNORDERED_SET
  161. # define BOOST_NO_CXX11_NUMERIC_LIMITS
  162. # define BOOST_NO_CXX11_ALLOCATOR
  163. # define BOOST_NO_CXX11_POINTER_TRAITS
  164. # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
  165. # define BOOST_NO_CXX11_SMART_PTR
  166. # define BOOST_NO_CXX11_HDR_FUNCTIONAL
  167. # define BOOST_NO_CXX11_HDR_ATOMIC
  168. # define BOOST_NO_CXX11_STD_ALIGN
  169. # define BOOST_NO_CXX11_ADDRESSOF
  170. # define BOOST_NO_CXX11_HDR_EXCEPTION
  171. #if defined(__has_include)
  172. #if !__has_include(<shared_mutex>)
  173. # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
  174. #elif __cplusplus < 201402
  175. # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
  176. #endif
  177. #else
  178. # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
  179. #endif
  180. // C++14 features
  181. # define BOOST_NO_CXX14_STD_EXCHANGE
  182. // C++17 features
  183. # define BOOST_NO_CXX17_STD_APPLY
  184. # define BOOST_NO_CXX17_STD_INVOKE
  185. # define BOOST_NO_CXX17_ITERATOR_TRAITS