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)
11 // See http://www.boost.org for most recent version.
13 // Microsoft Visual C++ compiler setup:
15 #define BOOST_MSVC _MSC_VER
17 #if _MSC_FULL_VER > 100000000
18 # define BOOST_MSVC_FULL_VER _MSC_FULL_VER
20 # define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
23 // turn off the warnings before we #include anything
24 #pragma warning( disable : 4503 ) // warning: decorated name length exceeded
26 #if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
27 # pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
28 # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
29 # define BOOST_NO_VOID_RETURNS
30 # define BOOST_NO_EXCEPTION_STD_NAMESPACE
32 # if BOOST_MSVC == 1202
33 # define BOOST_NO_STD_TYPEINFO
36 // disable min/max macro defines on vc6:
40 #if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
42 # if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
43 # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
46 # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
47 # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
48 # define BOOST_NO_PRIVATE_IN_AGGREGATE
49 # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
50 # define BOOST_NO_INTEGRAL_INT64_T
51 # define BOOST_NO_DEDUCED_TYPENAME
52 # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
54 // VC++ 6/7 has member templates but they have numerous problems including
55 // cases of silent failure, so for safety we define:
56 # define BOOST_NO_MEMBER_TEMPLATES
57 // For VC++ experts wishing to attempt workarounds, we define:
58 # define BOOST_MSVC6_MEMBER_TEMPLATES
60 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
61 # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
62 # define BOOST_NO_CV_VOID_SPECIALIZATIONS
63 # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
64 # define BOOST_NO_USING_TEMPLATE
65 # define BOOST_NO_SWPRINTF
66 # define BOOST_NO_TEMPLATE_TEMPLATES
67 # define BOOST_NO_SFINAE
68 # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
69 # define BOOST_NO_IS_ABSTRACT
70 # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
71 // TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
72 # if (_MSC_VER > 1200)
73 # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
79 // although a conforming signature for swprint exists in VC7.1
80 // it appears not to actually work:
81 # define BOOST_NO_SWPRINTF
85 // Windows CE does not have a conforming signature for swprintf
86 # define BOOST_NO_SWPRINTF
89 #if _MSC_VER <= 1400 // 1400 == VC++ 8.0
90 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
93 #if _MSC_VER <= 1600 // 1600 == VC++ 10.0
94 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
97 #if _MSC_VER == 1500 // 1500 == VC++ 9.0
99 # define BOOST_NO_ADL_BARRIER
102 #if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
103 # define BOOST_NO_INITIALIZER_LISTS
106 #ifndef _NATIVE_WCHAR_T_DEFINED
107 # define BOOST_NO_INTRINSIC_WCHAR_T
110 #if defined(_WIN32_WCE) || defined(UNDER_CE)
111 # define BOOST_NO_THREADEX
112 # define BOOST_NO_GETSYSTEMTIMEASFILETIME
113 # define BOOST_NO_SWPRINTF
117 // check for exception handling support:
119 # define BOOST_NO_EXCEPTIONS
125 #if (_MSC_VER >= 1200)
126 # define BOOST_HAS_MS_INT64
128 #if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1500))
129 # define BOOST_HAS_LONG_LONG
131 # define BOOST_NO_LONG_LONG
133 #if (_MSC_VER >= 1400) && !defined(_DEBUG)
134 # define BOOST_HAS_NRVO
137 // disable Win32 API's if compiler extentions are
140 #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
141 # define BOOST_DISABLE_WIN32
143 #if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
144 # define BOOST_NO_RTTI
148 // all versions support __declspec:
150 #define BOOST_HAS_DECLSPEC
155 // See above for BOOST_NO_LONG_LONG
157 // C++ features supported by VC++ 10 (aka 2010)
160 #define BOOST_NO_AUTO_DECLARATIONS
161 #define BOOST_NO_AUTO_MULTIDECLARATIONS
162 #define BOOST_NO_DECLTYPE
163 #define BOOST_NO_LAMBDAS
164 #define BOOST_NO_RVALUE_REFERENCES
165 #define BOOST_NO_STATIC_ASSERT
166 #endif // _MSC_VER < 1600
168 // C++0x features not supported by any versions
169 #define BOOST_NO_CHAR16_T
170 #define BOOST_NO_CHAR32_T
171 #define BOOST_NO_CONCEPTS
172 #define BOOST_NO_CONSTEXPR
173 #define BOOST_NO_DEFAULTED_FUNCTIONS
174 #define BOOST_NO_DELETED_FUNCTIONS
175 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
176 #define BOOST_NO_EXTERN_TEMPLATE
177 #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
178 #define BOOST_NO_INITIALIZER_LISTS
179 #define BOOST_NO_NULLPTR
180 #define BOOST_NO_RAW_LITERALS
181 #define BOOST_NO_SCOPED_ENUMS
182 #define BOOST_NO_SFINAE_EXPR
183 #define BOOST_NO_TEMPLATE_ALIASES
184 #define BOOST_NO_UNICODE_LITERALS
185 #define BOOST_NO_VARIADIC_TEMPLATES
188 // prefix and suffix headers:
190 #ifndef BOOST_ABI_PREFIX
191 # define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
193 #ifndef BOOST_ABI_SUFFIX
194 # define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
198 // these things are mostly bogus. 1200 means version 12.0 of the compiler. The
199 // artificial versions assigned to them only refer to the versions of some IDE
200 // these compilers have been shipped with, and even that is not all of it. Some
201 // were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
202 // IOW, you can't use these 'versions' in any sensible way. Sorry.
203 # if defined(UNDER_CE)
205 // Note: these are so far off, they are not really supported
206 # elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
207 # define BOOST_COMPILER_VERSION evc4.0
208 # elif _MSC_VER == 1400
209 # define BOOST_COMPILER_VERSION evc8
210 # elif _MSC_VER == 1500
211 # define BOOST_COMPILER_VERSION evc9
212 # elif _MSC_VER == 1600
213 # define BOOST_COMPILER_VERSION evc10
215 # if defined(BOOST_ASSERT_CONFIG)
216 # error "Unknown EVC++ compiler version - please run the configure tests and report the results"
218 # pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
223 // Note: these are so far off, they are not really supported
224 # define BOOST_COMPILER_VERSION 5.0
225 # elif _MSC_VER < 1300
226 # define BOOST_COMPILER_VERSION 6.0
227 # elif _MSC_VER == 1300
228 # define BOOST_COMPILER_VERSION 7.0
229 # elif _MSC_VER == 1310
230 # define BOOST_COMPILER_VERSION 7.1
231 # elif _MSC_VER == 1400
232 # define BOOST_COMPILER_VERSION 8.0
233 # elif _MSC_VER == 1500
234 # define BOOST_COMPILER_VERSION 9.0
235 # elif _MSC_VER == 1600
236 # define BOOST_COMPILER_VERSION 10.0
238 # define BOOST_COMPILER_VERSION _MSC_VER
242 #define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
246 // we don't support Visual C++ prior to version 6:
248 #error "Compiler not supported or configured - please reconfigure"
251 // last known and checked version is 1600 (VC10, aka 2010):
252 #if (_MSC_VER > 1600)
253 # if defined(BOOST_ASSERT_CONFIG)
254 # error "Unknown compiler version - please run the configure tests and report the results"
256 # pragma message("Unknown compiler version - please run the configure tests and report the results")