sunpro_cc.hpp 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. // (C) Copyright John Maddock 2001.
  2. // (C) Copyright Jens Maurer 2001 - 2003.
  3. // (C) Copyright Peter Dimov 2002.
  4. // (C) Copyright Aleksey Gurtovoy 2002 - 2003.
  5. // (C) Copyright David Abrahams 2002.
  6. // Use, modification and distribution are subject to the
  7. // Boost Software License, Version 1.0. (See accompanying file
  8. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. // See http://www.boost.org for most recent version.
  10. // Sun C++ compiler setup:
  11. # if __SUNPRO_CC <= 0x500
  12. # define BOOST_NO_MEMBER_TEMPLATES
  13. # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
  14. # endif
  15. # if (__SUNPRO_CC <= 0x520)
  16. //
  17. // Sunpro 5.2 and earler:
  18. //
  19. // although sunpro 5.2 supports the syntax for
  20. // inline initialization it often gets the value
  21. // wrong, especially where the value is computed
  22. // from other constants (J Maddock 6th May 2001)
  23. # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
  24. // Although sunpro 5.2 supports the syntax for
  25. // partial specialization, it often seems to
  26. // bind to the wrong specialization. Better
  27. // to disable it until suppport becomes more stable
  28. // (J Maddock 6th May 2001).
  29. # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  30. # endif
  31. # if (__SUNPRO_CC <= 0x530)
  32. // Requesting debug info (-g) with Boost.Python results
  33. // in an internal compiler error for "static const"
  34. // initialized in-class.
  35. // >> Assertion: (../links/dbg_cstabs.cc, line 611)
  36. // while processing ../test.cpp at line 0.
  37. // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)
  38. # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
  39. // SunPro 5.3 has better support for partial specialization,
  40. // but breaks when compiling std::less<shared_ptr<T> >
  41. // (Jens Maurer 4 Nov 2001).
  42. // std::less specialization fixed as reported by George
  43. // Heintzelman; partial specialization re-enabled
  44. // (Peter Dimov 17 Jan 2002)
  45. //# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  46. // integral constant expressions with 64 bit numbers fail
  47. # define BOOST_NO_INTEGRAL_INT64_T
  48. # endif
  49. # if (__SUNPRO_CC < 0x570)
  50. # define BOOST_NO_TEMPLATE_TEMPLATES
  51. // see http://lists.boost.org/MailArchives/boost/msg47184.php
  52. // and http://lists.boost.org/MailArchives/boost/msg47220.php
  53. # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
  54. # define BOOST_NO_SFINAE
  55. # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
  56. # endif
  57. # if (__SUNPRO_CC <= 0x580)
  58. # define BOOST_NO_IS_ABSTRACT
  59. # endif
  60. # if (__SUNPRO_CC <= 0x5100)
  61. // Sun 5.10 may not correctly value-initialize objects of
  62. // some user defined types, as was reported in April 2010
  63. // (CR 6947016), and confirmed by Steve Clamage.
  64. // (Niels Dekker, LKEB, May 2010).
  65. # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
  66. # endif
  67. //
  68. // Dynamic shared object (DSO) and dynamic-link library (DLL) support
  69. //
  70. #if __SUNPRO_CC > 0x500
  71. # define BOOST_SYMBOL_EXPORT __global
  72. # define BOOST_SYMBOL_IMPORT __global
  73. # define BOOST_SYMBOL_VISIBLE __global
  74. #endif
  75. // Deprecated symbol markup
  76. // Oracle Studio 12.4 supports deprecated attribute with a message; this is the first release that supports the attribute.
  77. #if (__SUNPRO_CC >= 0x5130)
  78. #define BOOST_DEPRECATED(msg) __attribute__((deprecated(msg)))
  79. #endif
  80. #if (__SUNPRO_CC < 0x5130)
  81. // C++03 features in 12.4:
  82. #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
  83. #define BOOST_NO_SFINAE_EXPR
  84. #define BOOST_NO_ADL_BARRIER
  85. #define BOOST_NO_CXX11_VARIADIC_MACROS
  86. #endif
  87. #if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100)
  88. // C++11 only featuires in 12.4:
  89. #define BOOST_NO_CXX11_AUTO_DECLARATIONS
  90. #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
  91. #define BOOST_NO_CXX11_CHAR16_T
  92. #define BOOST_NO_CXX11_CHAR32_T
  93. #define BOOST_NO_CXX11_CONSTEXPR
  94. #define BOOST_NO_CXX11_DECLTYPE
  95. #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
  96. #define BOOST_NO_CXX11_DELETED_FUNCTIONS
  97. #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
  98. #define BOOST_NO_CXX11_EXTERN_TEMPLATE
  99. #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
  100. #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
  101. #define BOOST_NO_CXX11_LAMBDAS
  102. #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
  103. #define BOOST_NO_CXX11_NOEXCEPT
  104. #define BOOST_NO_CXX11_NULLPTR
  105. #define BOOST_NO_CXX11_RANGE_BASED_FOR
  106. #define BOOST_NO_CXX11_RAW_LITERALS
  107. #define BOOST_NO_CXX11_RVALUE_REFERENCES
  108. #define BOOST_NO_CXX11_SCOPED_ENUMS
  109. #define BOOST_NO_CXX11_STATIC_ASSERT
  110. #define BOOST_NO_CXX11_TEMPLATE_ALIASES
  111. #define BOOST_NO_CXX11_UNICODE_LITERALS
  112. #define BOOST_NO_CXX11_ALIGNAS
  113. #define BOOST_NO_CXX11_ALIGNOF
  114. #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
  115. #define BOOST_NO_CXX11_INLINE_NAMESPACES
  116. #define BOOST_NO_CXX11_FINAL
  117. #define BOOST_NO_CXX11_OVERRIDE
  118. #define BOOST_NO_CXX11_UNRESTRICTED_UNION
  119. #endif
  120. #if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103)
  121. #define BOOST_NO_CXX11_VARIADIC_TEMPLATES
  122. #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
  123. #define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
  124. #define BOOST_NO_CXX11_DECLTYPE_N3276
  125. #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
  126. #define BOOST_NO_CXX11_REF_QUALIFIERS
  127. #define BOOST_NO_CXX11_THREAD_LOCAL
  128. #endif
  129. #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
  130. //
  131. // C++0x features
  132. //
  133. # define BOOST_HAS_LONG_LONG
  134. #define BOOST_NO_CXX11_SFINAE_EXPR
  135. // C++ 14:
  136. #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
  137. # define BOOST_NO_CXX14_AGGREGATE_NSDMI
  138. #endif
  139. #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
  140. # define BOOST_NO_CXX14_BINARY_LITERALS
  141. #endif
  142. #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
  143. # define BOOST_NO_CXX14_CONSTEXPR
  144. #endif
  145. #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) || (__cplusplus < 201402L)
  146. # define BOOST_NO_CXX14_DECLTYPE_AUTO
  147. #endif
  148. #if (__cplusplus < 201304) // There's no SD6 check for this....
  149. # define BOOST_NO_CXX14_DIGIT_SEPARATORS
  150. #endif
  151. #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
  152. # define BOOST_NO_CXX14_GENERIC_LAMBDAS
  153. #endif
  154. #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
  155. # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
  156. #endif
  157. #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
  158. # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
  159. #endif
  160. #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
  161. # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
  162. #endif
  163. // C++17
  164. #if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
  165. # define BOOST_NO_CXX17_STRUCTURED_BINDINGS
  166. #endif
  167. #if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
  168. # define BOOST_NO_CXX17_INLINE_VARIABLES
  169. #endif
  170. #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
  171. # define BOOST_NO_CXX17_FOLD_EXPRESSIONS
  172. #endif
  173. #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
  174. # define BOOST_NO_CXX17_IF_CONSTEXPR
  175. #endif
  176. #if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
  177. # define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
  178. #endif
  179. // Turn on threading support for Solaris 12.
  180. // Ticket #11972
  181. #if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS)
  182. # define BOOST_HAS_THREADS
  183. #endif
  184. //
  185. // Version
  186. //
  187. #define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC)
  188. //
  189. // versions check:
  190. // we don't support sunpro prior to version 4:
  191. #if __SUNPRO_CC < 0x400
  192. #error "Compiler not supported or configured - please reconfigure"
  193. #endif
  194. //
  195. // last known and checked version:
  196. #if (__SUNPRO_CC > 0x5150)
  197. # if defined(BOOST_ASSERT_CONFIG)
  198. # error "Boost.Config is older than your compiler - please check for an updated Boost release."
  199. # endif
  200. #endif