]> git.donarmstrong.com Git - rsem.git/blob - boost/config/compiler/visualc.hpp
Updated boost to v1.55.0
[rsem.git] / boost / config / compiler / visualc.hpp
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
11 //  See http://www.boost.org for most recent version.
12 //
13 //  Microsoft Visual C++ compiler setup:
14 //
15 //  We need to be careful with the checks in this file, as contrary
16 //  to popular belief there are versions with _MSC_VER with the final
17 //  digit non-zero (mainly the MIPS cross compiler).
18 //
19 //  So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.
20 //  No other comparisons (==, >, or <=) are safe.
21 //
22
23 #define BOOST_MSVC _MSC_VER
24
25 //
26 // Helper macro BOOST_MSVC_FULL_VER for use in Boost code:
27 //
28 #if _MSC_FULL_VER > 100000000
29 #  define BOOST_MSVC_FULL_VER _MSC_FULL_VER
30 #else
31 #  define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
32 #endif
33
34 // Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
35 #pragma warning( disable : 4503 ) // warning: decorated name length exceeded
36
37 #define BOOST_HAS_PRAGMA_ONCE
38
39 //
40 // versions check:
41 // we don't support Visual C++ prior to version 7.1:
42 #if _MSC_VER < 1310
43 #  error "Compiler not supported or configured - please reconfigure"
44 #endif
45
46 #if _MSC_FULL_VER < 180020827
47 #  define BOOST_NO_FENV_H
48 #endif
49
50 #if _MSC_VER < 1400
51 // although a conforming signature for swprint exists in VC7.1
52 // it appears not to actually work:
53 #  define BOOST_NO_SWPRINTF
54 // Our extern template tests also fail for this compiler:
55 #  define BOOST_NO_CXX11_EXTERN_TEMPLATE
56 // Variadic macros do not exist for VC7.1 and lower
57 #  define BOOST_NO_CXX11_VARIADIC_MACROS
58 #endif
59
60 #if defined(UNDER_CE)
61 // Windows CE does not have a conforming signature for swprintf
62 #  define BOOST_NO_SWPRINTF
63 #endif
64
65 #if _MSC_VER < 1500  // 140X == VC++ 8.0
66 #  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
67 #endif
68
69 #if _MSC_VER < 1600  // 150X == VC++ 9.0
70    // A bug in VC9:
71 #  define BOOST_NO_ADL_BARRIER
72 #endif
73
74
75 // MSVC (including the latest checked version) has not yet completely
76 // implemented value-initialization, as is reported:
77 // "VC++ does not value-initialize members of derived classes without
78 // user-declared constructor", reported in 2009 by Sylvester Hesp:
79 // https://connect.microsoft.com/VisualStudio/feedback/details/484295
80 // "Presence of copy constructor breaks member class initialization",
81 // reported in 2009 by Alex Vakulenko:
82 // https://connect.microsoft.com/VisualStudio/feedback/details/499606
83 // "Value-initialization in new-expression", reported in 2005 by
84 // Pavel Kuznetsov (MetaCommunications Engineering):
85 // https://connect.microsoft.com/VisualStudio/feedback/details/100744
86 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
87 // (Niels Dekker, LKEB, May 2010)
88 #  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
89
90 #ifndef _NATIVE_WCHAR_T_DEFINED
91 #  define BOOST_NO_INTRINSIC_WCHAR_T
92 #endif
93
94 #if defined(_WIN32_WCE) || defined(UNDER_CE)
95 #  define BOOST_NO_SWPRINTF
96 #endif
97
98 // we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE
99 #if !defined(_WIN32_WCE) && !defined(UNDER_CE)
100 #  define BOOST_HAS_THREADEX
101 #  define BOOST_HAS_GETSYSTEMTIMEASFILETIME
102 #endif
103
104 //
105 // check for exception handling support:
106 #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
107 #  define BOOST_NO_EXCEPTIONS
108 #endif
109
110 //
111 // __int64 support:
112 //
113 #define BOOST_HAS_MS_INT64
114 #if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)
115 #   define BOOST_HAS_LONG_LONG
116 #else
117 #   define BOOST_NO_LONG_LONG
118 #endif
119 #if (_MSC_VER >= 1400) && !defined(_DEBUG)
120 #   define BOOST_HAS_NRVO
121 #endif
122 //
123 // disable Win32 API's if compiler extentions are
124 // turned off:
125 //
126 #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
127 #  define BOOST_DISABLE_WIN32
128 #endif
129 #if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
130 #  define BOOST_NO_RTTI
131 #endif
132
133 //
134 // TR1 features:
135 //
136 #if _MSC_VER >= 1700
137 // # define BOOST_HAS_TR1_HASH                  // don't know if this is true yet.
138 // # define BOOST_HAS_TR1_TYPE_TRAITS   // don't know if this is true yet.
139 # define BOOST_HAS_TR1_UNORDERED_MAP
140 # define BOOST_HAS_TR1_UNORDERED_SET
141 #endif
142
143 //
144 // C++0x features
145 //
146 //   See above for BOOST_NO_LONG_LONG
147
148 // C++ features supported by VC++ 10 (aka 2010)
149 //
150 #if _MSC_VER < 1600
151 #  define BOOST_NO_CXX11_AUTO_DECLARATIONS
152 #  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
153 #  define BOOST_NO_CXX11_LAMBDAS
154 #  define BOOST_NO_CXX11_RVALUE_REFERENCES
155 #  define BOOST_NO_CXX11_STATIC_ASSERT
156 #  define BOOST_NO_CXX11_NULLPTR
157 #  define BOOST_NO_CXX11_DECLTYPE
158 #endif // _MSC_VER < 1600
159
160 #if _MSC_VER >= 1600
161 #  define BOOST_HAS_STDINT_H
162 #endif
163
164 // C++11 features supported by VC++ 11 (aka 2012)
165 //
166 #if _MSC_VER < 1700
167 #  define BOOST_NO_CXX11_RANGE_BASED_FOR
168 #  define BOOST_NO_CXX11_SCOPED_ENUMS
169 #endif // _MSC_VER < 1700
170
171 // C++11 features supported by VC++ 12 (aka 2013).
172 //
173 #if _MSC_FULL_VER < 180020827
174 #  define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
175 #  define BOOST_NO_CXX11_DELETED_FUNCTIONS
176 #  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
177 #  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
178 #  define BOOST_NO_CXX11_RAW_LITERALS
179 #  define BOOST_NO_CXX11_TEMPLATE_ALIASES
180 #  define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
181 #  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
182 #  define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
183 #endif
184
185 // C++11 features not supported by any versions
186 #define BOOST_NO_CXX11_CHAR16_T
187 #define BOOST_NO_CXX11_CHAR32_T
188 #define BOOST_NO_CXX11_CONSTEXPR
189 #define BOOST_NO_CXX11_DECLTYPE_N3276
190 #define BOOST_NO_CXX11_NOEXCEPT
191 #define BOOST_NO_CXX11_UNICODE_LITERALS
192 #define BOOST_NO_SFINAE_EXPR
193 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
194 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
195 #define BOOST_NO_CXX11_ALIGNAS
196 #define BOOST_NO_CXX11_INLINE_NAMESPACES
197
198 //
199 // prefix and suffix headers:
200 //
201 #ifndef BOOST_ABI_PREFIX
202 #  define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
203 #endif
204 #ifndef BOOST_ABI_SUFFIX
205 #  define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
206 #endif
207
208 #ifndef BOOST_COMPILER
209 // TODO:
210 // these things are mostly bogus. 1200 means version 12.0 of the compiler. The
211 // artificial versions assigned to them only refer to the versions of some IDE
212 // these compilers have been shipped with, and even that is not all of it. Some
213 // were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
214 // IOW, you can't use these 'versions' in any sensible way. Sorry.
215 # if defined(UNDER_CE)
216 #   if _MSC_VER < 1400
217       // Note: I'm not aware of any CE compiler with version 13xx
218 #      if defined(BOOST_ASSERT_CONFIG)
219 #         error "Unknown EVC++ compiler version - please run the configure tests and report the results"
220 #      else
221 #         pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
222 #      endif
223 #   elif _MSC_VER < 1500
224 #     define BOOST_COMPILER_VERSION evc8
225 #   elif _MSC_VER < 1600
226 #     define BOOST_COMPILER_VERSION evc9
227 #   elif _MSC_VER < 1700
228 #     define BOOST_COMPILER_VERSION evc10
229 #   elif _MSC_VER < 1800 
230 #     define BOOST_COMPILER_VERSION evc11 
231 #   elif _MSC_VER < 1900 
232 #     define BOOST_COMPILER_VERSION evc12
233 #   else
234 #      if defined(BOOST_ASSERT_CONFIG)
235 #         error "Unknown EVC++ compiler version - please run the configure tests and report the results"
236 #      else
237 #         pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
238 #      endif
239 #   endif
240 # else
241 #   if _MSC_VER < 1310
242       // Note: Versions up to 7.0 aren't supported.
243 #     define BOOST_COMPILER_VERSION 5.0
244 #   elif _MSC_VER < 1300
245 #     define BOOST_COMPILER_VERSION 6.0
246 #   elif _MSC_VER < 1310
247 #     define BOOST_COMPILER_VERSION 7.0
248 #   elif _MSC_VER < 1400
249 #     define BOOST_COMPILER_VERSION 7.1
250 #   elif _MSC_VER < 1500
251 #     define BOOST_COMPILER_VERSION 8.0
252 #   elif _MSC_VER < 1600
253 #     define BOOST_COMPILER_VERSION 9.0
254 #   elif _MSC_VER < 1700
255 #     define BOOST_COMPILER_VERSION 10.0
256 #   elif _MSC_VER < 1800 
257 #     define BOOST_COMPILER_VERSION 11.0
258 #   elif _MSC_VER < 1900
259 #     define BOOST_COMPILER_VERSION 12.0
260 #   else
261 #     define BOOST_COMPILER_VERSION _MSC_VER
262 #   endif
263 # endif
264
265 #  define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
266 #endif
267
268 //
269 // last known and checked version is 18.00.20827.3 (VC12 RC, aka 2013 RC):
270 #if (_MSC_VER > 1800 && _MSC_FULL_VER > 180020827)
271 #  if defined(BOOST_ASSERT_CONFIG)
272 #     error "Unknown compiler version - please run the configure tests and report the results"
273 #  else
274 #     pragma message("Unknown compiler version - please run the configure tests and report the results")
275 #  endif
276 #endif