summaryrefslogtreecommitdiff
path: root/boost/config/compiler/visualc.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/config/compiler/visualc.hpp')
-rw-r--r--boost/config/compiler/visualc.hpp224
1 files changed, 107 insertions, 117 deletions
diff --git a/boost/config/compiler/visualc.hpp b/boost/config/compiler/visualc.hpp
index 0b11faaf44..57b617d141 100644
--- a/boost/config/compiler/visualc.hpp
+++ b/boost/config/compiler/visualc.hpp
@@ -1,11 +1,11 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Darin Adler 2001 - 2002.
-// (C) Copyright Peter Dimov 2001.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Beman Dawes 2002 - 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Darin Adler 2001 - 2002.
+// (C) Copyright Peter Dimov 2001.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Beman Dawes 2002 - 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
@@ -34,67 +34,20 @@
// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
+#define BOOST_HAS_PRAGMA_ONCE
+
//
// versions check:
-// we don't support Visual C++ prior to version 6:
-#if _MSC_VER < 1200
+// we don't support Visual C++ prior to version 7.1:
+#if _MSC_VER < 1310
# error "Compiler not supported or configured - please reconfigure"
#endif
-#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
-# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
-# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-# define BOOST_NO_VOID_RETURNS
-# define BOOST_NO_EXCEPTION_STD_NAMESPACE
-
-# if _MSC_VER == 1202
-# define BOOST_NO_STD_TYPEINFO
-# endif
-
+#if _MSC_FULL_VER < 180020827
+# define BOOST_NO_FENV_H
#endif
-/// Visual Studio has no fenv.h
-#define BOOST_NO_FENV_H
-
-#if (_MSC_VER < 1310) // 130X == VC++ 7.0
-
-# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
-# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-# endif
-
-# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
-# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-# define BOOST_NO_PRIVATE_IN_AGGREGATE
-# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
-# define BOOST_NO_INTEGRAL_INT64_T
-# define BOOST_NO_DEDUCED_TYPENAME
-# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
-
-// VC++ 6/7 has member templates but they have numerous problems including
-// cases of silent failure, so for safety we define:
-# define BOOST_NO_MEMBER_TEMPLATES
-// For VC++ experts wishing to attempt workarounds, we define:
-# define BOOST_MSVC6_MEMBER_TEMPLATES
-
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-# define BOOST_NO_CV_VOID_SPECIALIZATIONS
-# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-# define BOOST_NO_USING_TEMPLATE
-# define BOOST_NO_SWPRINTF
-# define BOOST_NO_TEMPLATE_TEMPLATES
-# define BOOST_NO_SFINAE
-# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
-# define BOOST_NO_IS_ABSTRACT
-# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
-// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
-# if (_MSC_VER >= 1300)
-# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
-# endif
-
-#endif
-
-#if _MSC_VER < 1400
+#if _MSC_VER < 1400
// although a conforming signature for swprint exists in VC7.1
// it appears not to actually work:
# define BOOST_NO_SWPRINTF
@@ -104,11 +57,6 @@
# define BOOST_NO_CXX11_VARIADIC_MACROS
#endif
-#if defined(UNDER_CE)
-// Windows CE does not have a conforming signature for swprintf
-# define BOOST_NO_SWPRINTF
-#endif
-
#if _MSC_VER < 1500 // 140X == VC++ 8.0
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
#endif
@@ -119,9 +67,9 @@
#endif
-// MSVC (including the latest checked version) has not yet completely
+// MSVC (including the latest checked version) has not yet completely
// implemented value-initialization, as is reported:
-// "VC++ does not value-initialize members of derived classes without
+// "VC++ does not value-initialize members of derived classes without
// user-declared constructor", reported in 2009 by Sylvester Hesp:
// https://connect.microsoft.com/VisualStudio/feedback/details/484295
// "Presence of copy constructor breaks member class initialization",
@@ -134,37 +82,21 @@
// (Niels Dekker, LKEB, May 2010)
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#endif
-
#ifndef _NATIVE_WCHAR_T_DEFINED
# define BOOST_NO_INTRINSIC_WCHAR_T
#endif
-#if defined(_WIN32_WCE) || defined(UNDER_CE)
-# define BOOST_NO_SWPRINTF
-#endif
-
-// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE
-#if !defined(_WIN32_WCE) && !defined(UNDER_CE)
-# define BOOST_HAS_THREADEX
-# define BOOST_HAS_GETSYSTEMTIMEASFILETIME
-#endif
-
-//
-// check for exception handling support:
+//
+// check for exception handling support:
#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
+# define BOOST_NO_EXCEPTIONS
+#endif
//
// __int64 support:
//
-#if (_MSC_VER >= 1200)
-# define BOOST_HAS_MS_INT64
-#endif
-#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400))
+#define BOOST_HAS_MS_INT64
+#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)
# define BOOST_HAS_LONG_LONG
#else
# define BOOST_NO_LONG_LONG
@@ -172,8 +104,11 @@
#if (_MSC_VER >= 1400) && !defined(_DEBUG)
# define BOOST_HAS_NRVO
#endif
+#if _MSC_VER >= 1500 // 150X == VC++ 9.0
+# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
+#endif
//
-// disable Win32 API's if compiler extentions are
+// disable Win32 API's if compiler extensions are
// turned off:
//
#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
@@ -184,6 +119,16 @@
#endif
//
+// TR1 features:
+//
+#if _MSC_VER >= 1700
+// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
+// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
+# define BOOST_HAS_TR1_UNORDERED_MAP
+# define BOOST_HAS_TR1_UNORDERED_SET
+#endif
+
+//
// C++0x features
//
// See above for BOOST_NO_LONG_LONG
@@ -204,31 +149,72 @@
# define BOOST_HAS_STDINT_H
#endif
-// C++ features supported by VC++ 11 (aka 2012)
+// C++11 features supported by VC++ 11 (aka 2012)
//
#if _MSC_VER < 1700
+# define BOOST_NO_CXX11_FINAL
# define BOOST_NO_CXX11_RANGE_BASED_FOR
# define BOOST_NO_CXX11_SCOPED_ENUMS
#endif // _MSC_VER < 1700
-// C++0x features not supported by any versions
+// C++11 features supported by VC++ 12 (aka 2013).
+//
+#if _MSC_FULL_VER < 180020827
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
+
+// C++11 features supported by VC++ 14 (aka 2014) CTP1
+// Because the CTP is unsupported, unrelease, and only alpha quality,
+// it is only supported if BOOST_MSVC_ENABLE_2014_JUN_CTP is defined.
+//
+#if (_MSC_FULL_VER < 190021730) || !defined(BOOST_MSVC_ENABLE_2014_JUN_CTP)
+# define BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NO_CXX11_REF_QUALIFIERS
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+# define BOOST_NO_CXX11_ALIGNAS
+# define BOOST_NO_CXX11_INLINE_NAMESPACES
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+
+// C++11 features not supported by any versions
#define BOOST_NO_CXX11_CHAR16_T
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
//
// prefix and suffix headers:
//
@@ -241,17 +227,13 @@
#ifndef BOOST_COMPILER
// TODO:
-// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
+// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
// artificial versions assigned to them only refer to the versions of some IDE
// these compilers have been shipped with, and even that is not all of it. Some
// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
// IOW, you can't use these 'versions' in any sensible way. Sorry.
# if defined(UNDER_CE)
-# if _MSC_VER < 1200
- // Note: these are so far off, they are not really supported
-# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
-# define BOOST_COMPILER_VERSION evc4.0
-# elif _MSC_VER < 1400
+# if _MSC_VER < 1400
// Note: I'm not aware of any CE compiler with version 13xx
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
@@ -266,6 +248,10 @@
# define BOOST_COMPILER_VERSION evc10
# elif _MSC_VER < 1800
# define BOOST_COMPILER_VERSION evc11
+# elif _MSC_VER < 1900
+# define BOOST_COMPILER_VERSION evc12
+# elif _MSC_VER < 2000
+# define BOOST_COMPILER_VERSION evc14
# else
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
@@ -274,11 +260,11 @@
# endif
# endif
# else
-# if _MSC_VER < 1200
- // Note: these are so far off, they are not really supported
+# if _MSC_VER < 1310
+ // Note: Versions up to 7.0 aren't supported.
# define BOOST_COMPILER_VERSION 5.0
# elif _MSC_VER < 1300
-# define BOOST_COMPILER_VERSION 6.0
+# define BOOST_COMPILER_VERSION 6.0
# elif _MSC_VER < 1310
# define BOOST_COMPILER_VERSION 7.0
# elif _MSC_VER < 1400
@@ -290,7 +276,11 @@
# elif _MSC_VER < 1700
# define BOOST_COMPILER_VERSION 10.0
# elif _MSC_VER < 1800
-# define BOOST_COMPILER_VERSION 11.0
+# define BOOST_COMPILER_VERSION 11.0
+# elif _MSC_VER < 1900
+# define BOOST_COMPILER_VERSION 12.0
+# elif _MSC_VER < 2000
+# define BOOST_COMPILER_VERSION 14.0
# else
# define BOOST_COMPILER_VERSION _MSC_VER
# endif
@@ -300,8 +290,8 @@
#endif
//
-// last known and checked version is 1700 (VC11, aka 2011):
-#if (_MSC_VER > 1700)
+// last known and checked version is 19.00.22129 (VC14 CTP4):
+#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022129)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# else