]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/config/compiler/visualc.hpp
bump version to 19.2.0-pve1
[ceph.git] / ceph / src / boost / boost / config / compiler / visualc.hpp
CommitLineData
7c673cae
FG
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
92f5a8d4
TL
46// VS2005 (VC8) docs: __assume has been in Visual C++ for multiple releases
47#define BOOST_UNREACHABLE_RETURN(x) __assume(0);
48
7c673cae
FG
49#if _MSC_FULL_VER < 180020827
50# define BOOST_NO_FENV_H
51#endif
52
53#if _MSC_VER < 1400
54// although a conforming signature for swprint exists in VC7.1
55// it appears not to actually work:
56# define BOOST_NO_SWPRINTF
57// Our extern template tests also fail for this compiler:
58# define BOOST_NO_CXX11_EXTERN_TEMPLATE
59// Variadic macros do not exist for VC7.1 and lower
60# define BOOST_NO_CXX11_VARIADIC_MACROS
61# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
62#endif
63
64#if _MSC_VER < 1500 // 140X == VC++ 8.0
65# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
66#endif
67
68#if _MSC_VER < 1600 // 150X == VC++ 9.0
69 // A bug in VC9:
70# define BOOST_NO_ADL_BARRIER
71#endif
72
73
74#ifndef _NATIVE_WCHAR_T_DEFINED
75# define BOOST_NO_INTRINSIC_WCHAR_T
76#endif
77
78//
79// check for exception handling support:
80#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
81# define BOOST_NO_EXCEPTIONS
82#endif
83
84//
85// __int64 support:
86//
87#define BOOST_HAS_MS_INT64
88#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)
89# define BOOST_HAS_LONG_LONG
90#else
91# define BOOST_NO_LONG_LONG
92#endif
93#if (_MSC_VER >= 1400) && !defined(_DEBUG)
94# define BOOST_HAS_NRVO
95#endif
96#if _MSC_VER >= 1600 // 160X == VC++ 10.0
97# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
98#endif
99//
100// disable Win32 API's if compiler extensions are
101// turned off:
102//
103#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
104# define BOOST_DISABLE_WIN32
105#endif
106#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
107# define BOOST_NO_RTTI
108#endif
109
f51cf556
TL
110// Deprecated symbol markup
111#if (_MSC_VER >= 1400)
112#define BOOST_DEPRECATED(msg) __declspec(deprecated(msg))
113#else
114// MSVC 7.1 only supports the attribute without a message
115#define BOOST_DEPRECATED(msg) __declspec(deprecated)
116#endif
117
7c673cae
FG
118//
119// TR1 features:
120//
b32b8144 121#if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0)
92f5a8d4
TL
122// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
123// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
7c673cae
FG
124# define BOOST_HAS_TR1_UNORDERED_MAP
125# define BOOST_HAS_TR1_UNORDERED_SET
126#endif
127
128//
129// C++0x features
130//
131// See above for BOOST_NO_LONG_LONG
132
133// C++ features supported by VC++ 10 (aka 2010)
134//
135#if _MSC_VER < 1600
136# define BOOST_NO_CXX11_AUTO_DECLARATIONS
137# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
138# define BOOST_NO_CXX11_LAMBDAS
139# define BOOST_NO_CXX11_RVALUE_REFERENCES
140# define BOOST_NO_CXX11_STATIC_ASSERT
141# define BOOST_NO_CXX11_NULLPTR
142# define BOOST_NO_CXX11_DECLTYPE
143#endif // _MSC_VER < 1600
144
145#if _MSC_VER >= 1600
146# define BOOST_HAS_STDINT_H
147#endif
148
149// C++11 features supported by VC++ 11 (aka 2012)
150//
151#if _MSC_VER < 1700
152# define BOOST_NO_CXX11_FINAL
153# define BOOST_NO_CXX11_RANGE_BASED_FOR
154# define BOOST_NO_CXX11_SCOPED_ENUMS
20effc67 155# define BOOST_NO_CXX11_OVERRIDE
7c673cae
FG
156#endif // _MSC_VER < 1700
157
158// C++11 features supported by VC++ 12 (aka 2013).
159//
160#if _MSC_FULL_VER < 180020827
161# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
162# define BOOST_NO_CXX11_DELETED_FUNCTIONS
163# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
164# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
165# define BOOST_NO_CXX11_RAW_LITERALS
166# define BOOST_NO_CXX11_TEMPLATE_ALIASES
167# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
168# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
169# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
170# define BOOST_NO_CXX11_DECLTYPE_N3276
171#endif
172
173#if _MSC_FULL_VER >= 180020827
174#define BOOST_HAS_EXPM1
175#define BOOST_HAS_LOG1P
176#endif
177
178// C++11 features supported by VC++ 14 (aka 2015)
179//
180#if (_MSC_FULL_VER < 190023026)
181# define BOOST_NO_CXX11_NOEXCEPT
11fdf7f2 182# define BOOST_NO_CXX11_DEFAULTED_MOVES
7c673cae
FG
183# define BOOST_NO_CXX11_REF_QUALIFIERS
184# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
185# define BOOST_NO_CXX11_ALIGNAS
f51cf556 186# define BOOST_NO_CXX11_ALIGNOF
7c673cae
FG
187# define BOOST_NO_CXX11_INLINE_NAMESPACES
188# define BOOST_NO_CXX11_CHAR16_T
189# define BOOST_NO_CXX11_CHAR32_T
190# define BOOST_NO_CXX11_UNICODE_LITERALS
191# define BOOST_NO_CXX14_DECLTYPE_AUTO
192# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
193# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
194# define BOOST_NO_CXX14_BINARY_LITERALS
195# define BOOST_NO_CXX14_GENERIC_LAMBDAS
196# define BOOST_NO_CXX14_DIGIT_SEPARATORS
197# define BOOST_NO_CXX11_THREAD_LOCAL
f67539c2 198# define BOOST_NO_CXX11_UNRESTRICTED_UNION
7c673cae
FG
199#endif
200// C++11 features supported by VC++ 14 update 3 (aka 2015)
201//
202#if (_MSC_FULL_VER < 190024210)
203# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
204# define BOOST_NO_SFINAE_EXPR
205# define BOOST_NO_CXX11_CONSTEXPR
206#endif
207
b32b8144
FG
208// C++14 features supported by VC++ 14.1 (Visual Studio 2017)
209//
210#if (_MSC_VER < 1910)
211# define BOOST_NO_CXX14_AGGREGATE_NSDMI
212#endif
213
214// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3
215//
216#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
217# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
92f5a8d4
TL
218# define BOOST_NO_CXX17_IF_CONSTEXPR
219// Let the defaults handle these now:
220//# define BOOST_NO_CXX17_HDR_OPTIONAL
221//# define BOOST_NO_CXX17_HDR_STRING_VIEW
b32b8144
FG
222#endif
223
7c673cae
FG
224// MSVC including version 14 has not yet completely
225// implemented value-initialization, as is reported:
226// "VC++ does not value-initialize members of derived classes without
227// user-declared constructor", reported in 2009 by Sylvester Hesp:
228// https://connect.microsoft.com/VisualStudio/feedback/details/484295
229// "Presence of copy constructor breaks member class initialization",
230// reported in 2009 by Alex Vakulenko:
231// https://connect.microsoft.com/VisualStudio/feedback/details/499606
232// "Value-initialization in new-expression", reported in 2005 by
233// Pavel Kuznetsov (MetaCommunications Engineering):
234// https://connect.microsoft.com/VisualStudio/feedback/details/100744
235// Reported again by John Maddock in 2015 for VC14:
236// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
237// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
238// (Niels Dekker, LKEB, May 2010)
11fdf7f2 239// Still present in VC15.5, Dec 2017.
7c673cae
FG
240#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
241//
242// C++ 11:
243//
11fdf7f2
TL
244// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
245// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
246// on defining it for now:
247//
1e59de90 248#if (_MSC_FULL_VER < 193030705) || (_MSVC_LANG < 202004)
11fdf7f2 249# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
1e59de90 250#endif
11fdf7f2
TL
251
252#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
253// Supported from msvc-15.5 onwards:
b32b8144 254#define BOOST_NO_CXX11_SFINAE_EXPR
11fdf7f2 255#endif
92f5a8d4 256#if (_MSC_VER < 1915) || (_MSVC_LANG < 201402)
7c673cae 257// C++ 14:
11fdf7f2 258// Still gives internal compiler error for msvc-15.5:
7c673cae 259# define BOOST_NO_CXX14_CONSTEXPR
92f5a8d4 260#endif
b32b8144 261// C++ 17:
11fdf7f2 262#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
b32b8144
FG
263#define BOOST_NO_CXX17_INLINE_VARIABLES
264#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
11fdf7f2 265#endif
b32b8144
FG
266
267//
268// Things that don't work in clr mode:
269//
270#ifdef _M_CEE
271#ifndef BOOST_NO_CXX11_THREAD_LOCAL
272# define BOOST_NO_CXX11_THREAD_LOCAL
273#endif
f51cf556 274#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(_MSVC_LANG)
b32b8144
FG
275# define BOOST_NO_SFINAE_EXPR
276#endif
277#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
278# define BOOST_NO_CXX11_REF_QUALIFIERS
279#endif
280#endif
281#ifdef _M_CEE_PURE
282#ifndef BOOST_NO_CXX11_CONSTEXPR
283# define BOOST_NO_CXX11_CONSTEXPR
284#endif
7c673cae
FG
285#endif
286
287//
288// prefix and suffix headers:
289//
290#ifndef BOOST_ABI_PREFIX
291# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
292#endif
293#ifndef BOOST_ABI_SUFFIX
294# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
295#endif
296
1e59de90
TL
297//
298// Approximate compiler conformance version
299//
300#ifdef _MSVC_LANG
301# define BOOST_CXX_VERSION _MSVC_LANG
302#elif defined(_HAS_CXX17)
303# define BOOST_CXX_VERSION 201703L
304#elif BOOST_MSVC >= 1916
305# define BOOST_CXX_VERSION 201402L
306#endif
307
7c673cae
FG
308#ifndef BOOST_COMPILER
309// TODO:
310// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
311// artificial versions assigned to them only refer to the versions of some IDE
312// these compilers have been shipped with, and even that is not all of it. Some
313// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
314// IOW, you can't use these 'versions' in any sensible way. Sorry.
315# if defined(UNDER_CE)
316# if _MSC_VER < 1400
317 // Note: I'm not aware of any CE compiler with version 13xx
318# if defined(BOOST_ASSERT_CONFIG)
92f5a8d4 319# error "boost: Unknown EVC++ compiler version - please run the configure tests and report the results"
7c673cae 320# else
92f5a8d4 321# pragma message("boost: Unknown EVC++ compiler version - please run the configure tests and report the results")
7c673cae
FG
322# endif
323# elif _MSC_VER < 1500
324# define BOOST_COMPILER_VERSION evc8
325# elif _MSC_VER < 1600
326# define BOOST_COMPILER_VERSION evc9
327# elif _MSC_VER < 1700
328# define BOOST_COMPILER_VERSION evc10
329# elif _MSC_VER < 1800
330# define BOOST_COMPILER_VERSION evc11
331# elif _MSC_VER < 1900
332# define BOOST_COMPILER_VERSION evc12
333# elif _MSC_VER < 2000
334# define BOOST_COMPILER_VERSION evc14
335# else
336# if defined(BOOST_ASSERT_CONFIG)
92f5a8d4 337# error "boost: Unknown EVC++ compiler version - please run the configure tests and report the results"
7c673cae 338# else
92f5a8d4 339# pragma message("boost: Unknown EVC++ compiler version - please run the configure tests and report the results")
7c673cae
FG
340# endif
341# endif
342# else
b32b8144 343# if _MSC_VER < 1200
92f5a8d4 344 // Note: Versions up to 10.0 aren't supported.
7c673cae
FG
345# define BOOST_COMPILER_VERSION 5.0
346# elif _MSC_VER < 1300
347# define BOOST_COMPILER_VERSION 6.0
348# elif _MSC_VER < 1310
349# define BOOST_COMPILER_VERSION 7.0
350# elif _MSC_VER < 1400
351# define BOOST_COMPILER_VERSION 7.1
352# elif _MSC_VER < 1500
353# define BOOST_COMPILER_VERSION 8.0
354# elif _MSC_VER < 1600
355# define BOOST_COMPILER_VERSION 9.0
356# elif _MSC_VER < 1700
357# define BOOST_COMPILER_VERSION 10.0
358# elif _MSC_VER < 1800
359# define BOOST_COMPILER_VERSION 11.0
360# elif _MSC_VER < 1900
361# define BOOST_COMPILER_VERSION 12.0
b32b8144 362# elif _MSC_VER < 1910
7c673cae 363# define BOOST_COMPILER_VERSION 14.0
b32b8144
FG
364# elif _MSC_VER < 1920
365# define BOOST_COMPILER_VERSION 14.1
92f5a8d4
TL
366# elif _MSC_VER < 1930
367# define BOOST_COMPILER_VERSION 14.2
f51cf556
TL
368# elif _MSC_VER < 1940
369# define BOOST_COMPILER_VERSION 14.3
7c673cae
FG
370# else
371# define BOOST_COMPILER_VERSION _MSC_VER
372# endif
373# endif
374
375# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
376#endif
377
11fdf7f2
TL
378#include <boost/config/pragma_message.hpp>
379
7c673cae 380//
f51cf556
TL
381// last known and checked version is 19.3x (VS2022):
382#if (_MSC_VER >= 1940)
7c673cae 383# if defined(BOOST_ASSERT_CONFIG)
b32b8144
FG
384# error "Boost.Config is older than your current compiler version."
385# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
11fdf7f2
TL
386 //
387 // Disabled as of March 2018 - the pace of VS releases is hard to keep up with
388 // and in any case, we have relatively few defect macros defined now.
389 // BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
7c673cae
FG
390# endif
391#endif