metrowerks.hpp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. // (C) Copyright John Maddock 2001.
  2. // (C) Copyright Darin Adler 2001.
  3. // (C) Copyright Peter Dimov 2001.
  4. // (C) Copyright David Abrahams 2001 - 2002.
  5. // (C) Copyright Beman Dawes 2001 - 2003.
  6. // (C) Copyright Stefan Slapeta 2004.
  7. // Use, modification and distribution are subject to the
  8. // Boost Software License, Version 1.0. (See accompanying file
  9. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  10. // See http://www.boost.org for most recent version.
  11. // Metrowerks C++ compiler setup:
  12. // locale support is disabled when linking with the dynamic runtime
  13. # ifdef _MSL_NO_LOCALE
  14. # define BOOST_NO_STD_LOCALE
  15. # endif
  16. # if __MWERKS__ <= 0x2301 // 5.3
  17. # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
  18. # define BOOST_NO_POINTER_TO_MEMBER_CONST
  19. # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
  20. # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
  21. # endif
  22. # if __MWERKS__ <= 0x2401 // 6.2
  23. //# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
  24. # endif
  25. # if(__MWERKS__ <= 0x2407) // 7.x
  26. # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
  27. # define BOOST_NO_UNREACHABLE_RETURN_DETECTION
  28. # endif
  29. # if(__MWERKS__ <= 0x3003) // 8.x
  30. # define BOOST_NO_SFINAE
  31. # endif
  32. // the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
  33. // tested version *only*:
  34. # if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
  35. # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
  36. # define BOOST_NO_IS_ABSTRACT
  37. # endif
  38. #if !__option(wchar_type)
  39. # define BOOST_NO_INTRINSIC_WCHAR_T
  40. #endif
  41. #if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS)
  42. # define BOOST_NO_EXCEPTIONS
  43. #endif
  44. #if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)
  45. # if __MWERKS__ == 0x3000
  46. # define BOOST_COMPILER_VERSION 8.0
  47. # elif __MWERKS__ == 0x3001
  48. # define BOOST_COMPILER_VERSION 8.1
  49. # elif __MWERKS__ == 0x3002
  50. # define BOOST_COMPILER_VERSION 8.2
  51. # elif __MWERKS__ == 0x3003
  52. # define BOOST_COMPILER_VERSION 8.3
  53. # elif __MWERKS__ == 0x3200
  54. # define BOOST_COMPILER_VERSION 9.0
  55. # elif __MWERKS__ == 0x3201
  56. # define BOOST_COMPILER_VERSION 9.1
  57. # elif __MWERKS__ == 0x3202
  58. # define BOOST_COMPILER_VERSION 9.2
  59. # elif __MWERKS__ == 0x3204
  60. # define BOOST_COMPILER_VERSION 9.3
  61. # elif __MWERKS__ == 0x3205
  62. # define BOOST_COMPILER_VERSION 9.4
  63. # elif __MWERKS__ == 0x3206
  64. # define BOOST_COMPILER_VERSION 9.5
  65. # elif __MWERKS__ == 0x3207
  66. # define BOOST_COMPILER_VERSION 9.6
  67. # else
  68. # define BOOST_COMPILER_VERSION __MWERKS__
  69. # endif
  70. #else
  71. # define BOOST_COMPILER_VERSION __MWERKS__
  72. #endif
  73. //
  74. // C++0x features
  75. //
  76. // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
  77. //
  78. #if __MWERKS__ > 0x3206 && __option(rvalue_refs)
  79. # define BOOST_HAS_RVALUE_REFS
  80. #else
  81. # define BOOST_NO_CXX11_RVALUE_REFERENCES
  82. #endif
  83. #define BOOST_NO_CXX11_AUTO_DECLARATIONS
  84. #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
  85. #define BOOST_NO_CXX11_CHAR16_T
  86. #define BOOST_NO_CXX11_CHAR32_T
  87. #define BOOST_NO_CXX11_CONSTEXPR
  88. #define BOOST_NO_CXX11_DECLTYPE
  89. #define BOOST_NO_CXX11_DECLTYPE_N3276
  90. #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
  91. #define BOOST_NO_CXX11_DELETED_FUNCTIONS
  92. #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
  93. #define BOOST_NO_CXX11_EXTERN_TEMPLATE
  94. #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
  95. #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
  96. #define BOOST_NO_CXX11_LAMBDAS
  97. #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
  98. #define BOOST_NO_CXX11_NOEXCEPT
  99. #define BOOST_NO_CXX11_NULLPTR
  100. #define BOOST_NO_CXX11_RANGE_BASED_FOR
  101. #define BOOST_NO_CXX11_RAW_LITERALS
  102. #define BOOST_NO_CXX11_SCOPED_ENUMS
  103. #define BOOST_NO_SFINAE_EXPR
  104. #define BOOST_NO_CXX11_SFINAE_EXPR
  105. #define BOOST_NO_CXX11_STATIC_ASSERT
  106. #define BOOST_NO_CXX11_TEMPLATE_ALIASES
  107. #define BOOST_NO_CXX11_UNICODE_LITERALS
  108. #define BOOST_NO_CXX11_VARIADIC_TEMPLATES
  109. #define BOOST_NO_CXX11_VARIADIC_MACROS
  110. #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
  111. #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
  112. #define BOOST_NO_CXX11_ALIGNAS
  113. #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
  114. #define BOOST_NO_CXX11_INLINE_NAMESPACES
  115. #define BOOST_NO_CXX11_REF_QUALIFIERS
  116. #define BOOST_NO_CXX11_FINAL
  117. #define BOOST_NO_CXX11_THREAD_LOCAL
  118. // C++ 14:
  119. #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
  120. # define BOOST_NO_CXX14_AGGREGATE_NSDMI
  121. #endif
  122. #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
  123. # define BOOST_NO_CXX14_BINARY_LITERALS
  124. #endif
  125. #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
  126. # define BOOST_NO_CXX14_CONSTEXPR
  127. #endif
  128. #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
  129. # define BOOST_NO_CXX14_DECLTYPE_AUTO
  130. #endif
  131. #if (__cplusplus < 201304) // There's no SD6 check for this....
  132. # define BOOST_NO_CXX14_DIGIT_SEPARATORS
  133. #endif
  134. #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
  135. # define BOOST_NO_CXX14_GENERIC_LAMBDAS
  136. #endif
  137. #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
  138. # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
  139. #endif
  140. #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
  141. # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
  142. #endif
  143. #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
  144. # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
  145. #endif
  146. // C++17
  147. #if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
  148. # define BOOST_NO_CXX17_STRUCTURED_BINDINGS
  149. #endif
  150. #if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
  151. # define BOOST_NO_CXX17_INLINE_VARIABLES
  152. #endif
  153. #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
  154. # define BOOST_NO_CXX17_FOLD_EXPRESSIONS
  155. #endif
  156. #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
  157. # define BOOST_NO_CXX17_IF_CONSTEXPR
  158. #endif
  159. #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
  160. //
  161. // versions check:
  162. // we don't support Metrowerks prior to version 5.3:
  163. #if __MWERKS__ < 0x2301
  164. # error "Compiler not supported or configured - please reconfigure"
  165. #endif
  166. //
  167. // last known and checked version:
  168. #if (__MWERKS__ > 0x3205)
  169. # if defined(BOOST_ASSERT_CONFIG)
  170. # error "boost: Unknown compiler version - please run the configure tests and report the results"
  171. # endif
  172. #endif