diff DEPENDENCIES/generic/include/boost/config/compiler/gcc.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/config/compiler/gcc.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/config/compiler/gcc.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -16,8 +16,13 @@
 //
 // Define BOOST_GCC so we know this is "real" GCC and not some pretender:
 //
+#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 #if !defined(__CUDACC__)
-#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#define BOOST_GCC BOOST_GCC_VERSION
+#endif
+
+#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
+#  define BOOST_GCC_CXX11
 #endif
 
 #if __GNUC__ == 3
@@ -42,11 +47,11 @@
 #endif
 
 // GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#if BOOST_GCC_VERSION >= 30400
 #define BOOST_HAS_PRAGMA_ONCE
 #endif
 
-#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
+#if BOOST_GCC_VERSION < 40400
 // Previous versions of GCC did not completely implement value-initialization:
 // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
 // members", reported by Jonathan Wakely in 2006,
@@ -74,8 +79,12 @@
 
 //
 // gcc has "long long"
+// Except on Darwin with standard compliance enabled (-pedantic)
+// Apple gcc helpfully defines this macro we can query
 //
-#define BOOST_HAS_LONG_LONG
+#if !defined(__DARWIN_NO_LONG_LONG)
+# define BOOST_HAS_LONG_LONG
+#endif
 
 //
 // gcc implements the named return value optimization since version 3.1
@@ -110,7 +119,7 @@
 //
 // RTTI and typeinfo detection is possible post gcc-4.3:
 //
-#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
+#if BOOST_GCC_VERSION > 40300
 #  ifndef __GXX_RTTI
 #     ifndef BOOST_NO_TYPEID
 #        define BOOST_NO_TYPEID
@@ -137,7 +146,7 @@
 
 // C++0x features in 4.3.n and later
 //
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11)
 // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
 // passed on the command line, which in turn defines
 // __GXX_EXPERIMENTAL_CXX0X__.
@@ -150,19 +159,11 @@
 #  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
 #  define BOOST_NO_CXX11_RVALUE_REFERENCES
 #  define BOOST_NO_CXX11_STATIC_ASSERT
-
-// Variadic templates compiler:
-//   http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
-#  if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
-#    define BOOST_HAS_VARIADIC_TMPL
-#  else
-#    define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#  endif
 #endif
 
 // C++0x features in 4.4.n and later
 //
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11)
 #  define BOOST_NO_CXX11_AUTO_DECLARATIONS
 #  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
 #  define BOOST_NO_CXX11_CHAR16_T
@@ -172,20 +173,21 @@
 #  define BOOST_NO_CXX11_DELETED_FUNCTIONS
 #  define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
 #  define BOOST_NO_CXX11_INLINE_NAMESPACES
+#  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
 #endif
 
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+#if BOOST_GCC_VERSION < 40500
 #  define BOOST_NO_SFINAE_EXPR
 #endif
 
 // GCC 4.5 forbids declaration of defaulted functions in private or protected sections
-#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 5)
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11)
 #  define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
 #endif
 
 // C++0x features in 4.5.0 and later
 //
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11)
 #  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
 #  define BOOST_NO_CXX11_LAMBDAS
 #  define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
@@ -195,7 +197,7 @@
 
 // C++0x features in 4.5.1 and later
 //
-#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11)
 // scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
 #  define BOOST_NO_CXX11_SCOPED_ENUMS
@@ -203,7 +205,7 @@
 
 // C++0x features in 4.6.n and later
 //
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
 #define BOOST_NO_CXX11_CONSTEXPR
 #define BOOST_NO_CXX11_NOEXCEPT
 #define BOOST_NO_CXX11_NULLPTR
@@ -213,21 +215,55 @@
 
 // C++0x features in 4.7.n and later
 //
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
+#  define BOOST_NO_CXX11_FINAL
 #  define BOOST_NO_CXX11_TEMPLATE_ALIASES
 #  define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#  define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
 #endif
 
 // C++0x features in 4.8.n and later
 //
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
 #  define BOOST_NO_CXX11_ALIGNAS
 #endif
 
 // C++0x features in 4.8.1 and later
 //
-#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11)
 #  define BOOST_NO_CXX11_DECLTYPE_N3276
+#  define BOOST_NO_CXX11_REF_QUALIFIERS
+#  define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+
+// C++14 features in 4.9.0 and later
+//
+#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300)
+#  define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#  define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#  define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#  define BOOST_NO_CXX14_DECLTYPE_AUTO
+#  if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11))
+#     define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#  endif
+#endif
+
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+#  define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+#  define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+#  define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+//
+// Unused attribute:
+#if __GNUC__ >= 4
+#  define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
 #endif
 
 #ifndef BOOST_COMPILER
@@ -243,12 +279,12 @@
 
 // versions check:
 // we don't know gcc prior to version 3.30:
-#if (__GNUC__ < 3) || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3))
+#if (BOOST_GCC_VERSION< 30300)
 #  error "Compiler not configured - please reconfigure"
 #endif
 //
-// last known and checked version is 4.6 (Pre-release):
-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))
+// last known and checked version is 4.9:
+#if (BOOST_GCC_VERSION > 40900)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
@@ -258,4 +294,3 @@
 #  endif
 #endif
 
-