visualc.hpp 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. // (C) Copyright John Maddock 2001 - 2003.
  2. // (C) Copyright Darin Adler 2001 - 2002.
  3. // (C) Copyright Peter Dimov 2001.
  4. // (C) Copyright Aleksey Gurtovoy 2002.
  5. // (C) Copyright David Abrahams 2002 - 2003.
  6. // (C) Copyright Beman Dawes 2002 - 2003.
  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. // Microsoft Visual C++ compiler setup:
  12. #define BOOST_MSVC _MSC_VER
  13. // turn off the warnings before we #include anything
  14. #pragma warning( disable : 4503 ) // warning: decorated name length exceeded
  15. #if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
  16. # pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
  17. # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
  18. # define BOOST_NO_VOID_RETURNS
  19. # define BOOST_NO_EXCEPTION_STD_NAMESPACE
  20. # if BOOST_MSVC == 1202
  21. # define BOOST_NO_STD_TYPEINFO
  22. # endif
  23. // disable min/max macro defines on vc6:
  24. //
  25. #endif
  26. #if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
  27. # if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
  28. # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
  29. # endif
  30. # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
  31. # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
  32. # define BOOST_NO_PRIVATE_IN_AGGREGATE
  33. # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
  34. # define BOOST_NO_INTEGRAL_INT64_T
  35. # define BOOST_NO_DEDUCED_TYPENAME
  36. # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
  37. // VC++ 6/7 has member templates but they have numerous problems including
  38. // cases of silent failure, so for safety we define:
  39. # define BOOST_NO_MEMBER_TEMPLATES
  40. // For VC++ experts wishing to attempt workarounds, we define:
  41. # define BOOST_MSVC6_MEMBER_TEMPLATES
  42. # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
  43. # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  44. # define BOOST_NO_CV_VOID_SPECIALIZATIONS
  45. # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
  46. # define BOOST_NO_USING_TEMPLATE
  47. # define BOOST_NO_SWPRINTF
  48. # define BOOST_NO_TEMPLATE_TEMPLATES
  49. # define BOOST_NO_SFINAE
  50. # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
  51. # define BOOST_NO_IS_ABSTRACT
  52. # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
  53. // TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
  54. # if (_MSC_VER > 1200)
  55. # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
  56. # endif
  57. #endif
  58. #if _MSC_VER < 1400
  59. // although a conforming signature for swprint exists in VC7.1
  60. // it appears not to actually work:
  61. # define BOOST_NO_SWPRINTF
  62. #endif
  63. #if defined(UNDER_CE)
  64. // Windows CE does not have a conforming signature for swprintf
  65. # define BOOST_NO_SWPRINTF
  66. #endif
  67. #if _MSC_VER <= 1400 // 1400 == VC++ 8.0
  68. # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
  69. #endif
  70. #if _MSC_VER <= 1600 // 1600 == VC++ 10.0
  71. # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
  72. #endif
  73. #if _MSC_VER == 1500 // 1500 == VC++ 9.0
  74. // A bug in VC9:
  75. # define BOOST_NO_ADL_BARRIER
  76. #endif
  77. #if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
  78. # define BOOST_NO_INITIALIZER_LISTS
  79. #endif
  80. #ifndef _NATIVE_WCHAR_T_DEFINED
  81. # define BOOST_NO_INTRINSIC_WCHAR_T
  82. #endif
  83. #if defined(_WIN32_WCE) || defined(UNDER_CE)
  84. # define BOOST_NO_THREADEX
  85. # define BOOST_NO_GETSYSTEMTIMEASFILETIME
  86. # define BOOST_NO_SWPRINTF
  87. #endif
  88. //
  89. // check for exception handling support:
  90. #ifndef _CPPUNWIND
  91. # define BOOST_NO_EXCEPTIONS
  92. #endif
  93. //
  94. // __int64 support:
  95. //
  96. #if (_MSC_VER >= 1200)
  97. # define BOOST_HAS_MS_INT64
  98. #endif
  99. #if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
  100. # define BOOST_HAS_LONG_LONG
  101. #else
  102. # define BOOST_NO_LONG_LONG
  103. #endif
  104. #if (_MSC_VER >= 1400) && !defined(_DEBUG)
  105. # define BOOST_HAS_NRVO
  106. #endif
  107. //
  108. // disable Win32 API's if compiler extentions are
  109. // turned off:
  110. //
  111. #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
  112. # define BOOST_DISABLE_WIN32
  113. #endif
  114. #if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
  115. # define BOOST_NO_RTTI
  116. #endif
  117. //
  118. // all versions support __declspec:
  119. //
  120. #define BOOST_HAS_DECLSPEC
  121. //
  122. // C++0x features
  123. //
  124. // See above for BOOST_NO_LONG_LONG
  125. // C++ features supported by VC++ 10 (aka 2010)
  126. //
  127. #if _MSC_VER < 1600
  128. #define BOOST_NO_AUTO_DECLARATIONS
  129. #define BOOST_NO_AUTO_MULTIDECLARATIONS
  130. #define BOOST_NO_DECLTYPE
  131. #define BOOST_NO_LAMBDAS
  132. #define BOOST_NO_RVALUE_REFERENCES
  133. #define BOOST_NO_STATIC_ASSERT
  134. #endif // _MSC_VER < 1600
  135. // C++0x features not supported by any versions
  136. #define BOOST_NO_CHAR16_T
  137. #define BOOST_NO_CHAR32_T
  138. #define BOOST_NO_CONCEPTS
  139. #define BOOST_NO_CONSTEXPR
  140. #define BOOST_NO_DEFAULTED_FUNCTIONS
  141. #define BOOST_NO_DELETED_FUNCTIONS
  142. #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
  143. #define BOOST_NO_EXTERN_TEMPLATE
  144. #define BOOST_NO_INITIALIZER_LISTS
  145. #define BOOST_NO_NULLPTR
  146. #define BOOST_NO_RAW_LITERALS
  147. #define BOOST_NO_SCOPED_ENUMS
  148. #define BOOST_NO_TEMPLATE_ALIASES
  149. #define BOOST_NO_UNICODE_LITERALS
  150. #define BOOST_NO_VARIADIC_TEMPLATES
  151. //
  152. // prefix and suffix headers:
  153. //
  154. #ifndef BOOST_ABI_PREFIX
  155. # define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
  156. #endif
  157. #ifndef BOOST_ABI_SUFFIX
  158. # define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
  159. #endif
  160. // TODO:
  161. // these things are mostly bogus. 1200 means version 12.0 of the compiler. The
  162. // artificial versions assigned to them only refer to the versions of some IDE
  163. // these compilers have been shipped with, and even that is not all of it. Some
  164. // were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
  165. // IOW, you can't use these 'versions' in any sensible way. Sorry.
  166. # if defined(UNDER_CE)
  167. # if _MSC_VER < 1200
  168. // Note: these are so far off, they are not really supported
  169. # elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
  170. # define BOOST_COMPILER_VERSION evc4.0
  171. # elif _MSC_VER == 1400
  172. # define BOOST_COMPILER_VERSION evc8
  173. # elif _MSC_VER == 1500
  174. # define BOOST_COMPILER_VERSION evc9
  175. # elif _MSC_VER == 1600
  176. # define BOOST_COMPILER_VERSION evc10
  177. # else
  178. # if defined(BOOST_ASSERT_CONFIG)
  179. # error "Unknown EVC++ compiler version - please run the configure tests and report the results"
  180. # else
  181. # pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
  182. # endif
  183. # endif
  184. # else
  185. # if _MSC_VER < 1200
  186. // Note: these are so far off, they are not really supported
  187. # define BOOST_COMPILER_VERSION 5.0
  188. # elif _MSC_VER < 1300
  189. # define BOOST_COMPILER_VERSION 6.0
  190. # elif _MSC_VER == 1300
  191. # define BOOST_COMPILER_VERSION 7.0
  192. # elif _MSC_VER == 1310
  193. # define BOOST_COMPILER_VERSION 7.1
  194. # elif _MSC_VER == 1400
  195. # define BOOST_COMPILER_VERSION 8.0
  196. # elif _MSC_VER == 1500
  197. # define BOOST_COMPILER_VERSION 9.0
  198. # elif _MSC_VER == 1600
  199. # define BOOST_COMPILER_VERSION 10.0
  200. # else
  201. # define BOOST_COMPILER_VERSION _MSC_VER
  202. # endif
  203. # endif
  204. #define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
  205. //
  206. // versions check:
  207. // we don't support Visual C++ prior to version 6:
  208. #if _MSC_VER < 1200
  209. #error "Compiler not supported or configured - please reconfigure"
  210. #endif
  211. //
  212. // last known and checked version is 1600 (VC10, aka 2010):
  213. #if (_MSC_VER > 1600)
  214. # if defined(BOOST_ASSERT_CONFIG)
  215. # error "Unknown compiler version - please run the configure tests and report the results"
  216. # else
  217. # pragma message("Unknown compiler version - please run the configure tests and report the results")
  218. # endif
  219. #endif