2013-06-15 13:48:07 +00:00
|
|
|
// (C) Copyright John Maddock 2001 - 2003.
|
|
|
|
|
// (C) Copyright Darin Adler 2001 - 2002.
|
|
|
|
|
// (C) Copyright Jens Maurer 2001 - 2002.
|
|
|
|
|
// (C) Copyright Beman Dawes 2001 - 2003.
|
|
|
|
|
// (C) Copyright Douglas Gregor 2002.
|
|
|
|
|
// (C) Copyright David Abrahams 2002 - 2003.
|
|
|
|
|
// (C) Copyright Synge Todo 2003.
|
|
|
|
|
// Use, modification and distribution are subject to the
|
|
|
|
|
// Boost Software License, Version 1.0. (See accompanying file
|
2003-10-04 11:29:20 +00:00
|
|
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
2001-09-18 11:13:39 +00:00
|
|
|
|
|
|
|
|
// See http://www.boost.org for most recent version.
|
|
|
|
|
|
2013-02-19 16:26:06 +00:00
|
|
|
// GNU C++ compiler setup.
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Define BOOST_GCC so we know this is "real" GCC and not some pretender:
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
2013-02-19 17:11:36 +00:00
|
|
|
#if !defined(__CUDACC__)
|
2014-09-24 19:27:40 +01:00
|
|
|
#define BOOST_GCC BOOST_GCC_VERSION
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
|
|
|
|
|
# define BOOST_GCC_CXX11
|
2013-02-19 17:11:36 +00:00
|
|
|
#endif
|
2001-09-18 11:13:39 +00:00
|
|
|
|
2013-08-10 12:41:58 +00:00
|
|
|
#if __GNUC__ == 3
|
2007-09-25 23:11:12 +00:00
|
|
|
# if defined (__PATHSCALE__)
|
|
|
|
|
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
|
|
|
|
# define BOOST_NO_IS_ABSTRACT
|
|
|
|
|
# endif
|
2013-08-10 12:41:58 +00:00
|
|
|
|
2004-12-04 11:36:36 +00:00
|
|
|
# if __GNUC_MINOR__ < 4
|
|
|
|
|
# define BOOST_NO_IS_ABSTRACT
|
|
|
|
|
# endif
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
2004-12-04 11:36:36 +00:00
|
|
|
#endif
|
2007-09-10 17:18:16 +00:00
|
|
|
#if __GNUC__ < 4
|
|
|
|
|
//
|
|
|
|
|
// All problems to gcc-3.x and earlier here:
|
|
|
|
|
//
|
|
|
|
|
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
2009-09-18 10:43:57 +00:00
|
|
|
# ifdef __OPEN64__
|
|
|
|
|
# define BOOST_NO_IS_ABSTRACT
|
|
|
|
|
# endif
|
2007-09-10 17:18:16 +00:00
|
|
|
#endif
|
2003-05-25 10:53:26 +00:00
|
|
|
|
2013-06-15 16:40:46 +00:00
|
|
|
// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links
|
2014-09-24 19:27:40 +01:00
|
|
|
#if BOOST_GCC_VERSION >= 30400
|
2013-06-15 16:40:46 +00:00
|
|
|
#define BOOST_HAS_PRAGMA_ONCE
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-09-24 19:27:40 +01:00
|
|
|
#if BOOST_GCC_VERSION < 40400
|
2010-04-28 08:50:23 +00:00
|
|
|
// 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,
|
|
|
|
|
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
|
|
|
|
|
// GCC Bug 33916, "Default constructor fails to initialize array members",
|
|
|
|
|
// reported by Michael Elizabeth Chastain in 2007,
|
|
|
|
|
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
|
|
|
|
|
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
2010-06-27 11:14:54 +00:00
|
|
|
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
2010-04-28 08:50:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
2010-05-05 17:55:15 +00:00
|
|
|
#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
2003-04-11 10:47:00 +00:00
|
|
|
# define BOOST_NO_EXCEPTIONS
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-01-17 04:51:54 +00:00
|
|
|
|
2001-09-22 11:50:15 +00:00
|
|
|
//
|
2003-01-30 18:13:55 +00:00
|
|
|
// Threading support: Turn this on unconditionally here (except for
|
2003-04-11 10:47:00 +00:00
|
|
|
// those platforms where we can know for sure). It will get turned off again
|
2003-01-30 18:13:55 +00:00
|
|
|
// later if no threading API is detected.
|
2001-09-22 11:50:15 +00:00
|
|
|
//
|
2003-08-26 10:47:22 +00:00
|
|
|
#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
2003-01-30 18:13:55 +00:00
|
|
|
# define BOOST_HAS_THREADS
|
2013-06-15 13:48:07 +00:00
|
|
|
#endif
|
2001-09-22 11:50:15 +00:00
|
|
|
|
2001-10-16 11:40:19 +00:00
|
|
|
//
|
2001-10-30 22:34:48 +00:00
|
|
|
// gcc has "long long"
|
2014-02-04 17:32:06 -07:00
|
|
|
// Except on Darwin with standard compliance enabled (-pedantic)
|
|
|
|
|
// Apple gcc helpfully defines this macro we can query
|
2001-10-16 11:40:19 +00:00
|
|
|
//
|
2014-02-04 17:32:06 -07:00
|
|
|
#if !defined(__DARWIN_NO_LONG_LONG)
|
|
|
|
|
# define BOOST_HAS_LONG_LONG
|
|
|
|
|
#endif
|
2001-10-16 11:40:19 +00:00
|
|
|
|
2002-11-04 01:59:32 +00:00
|
|
|
//
|
|
|
|
|
// gcc implements the named return value optimization since version 3.1
|
|
|
|
|
//
|
|
|
|
|
#define BOOST_HAS_NRVO
|
2010-05-22 12:12:00 +00:00
|
|
|
|
2013-06-07 20:05:18 +00:00
|
|
|
// Branch prediction hints
|
|
|
|
|
#define BOOST_LIKELY(x) __builtin_expect(x, 1)
|
|
|
|
|
#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
|
|
|
|
|
|
2010-05-22 12:12:00 +00:00
|
|
|
//
|
|
|
|
|
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
|
|
|
|
//
|
|
|
|
|
#if __GNUC__ >= 4
|
2018-03-11 17:37:13 +03:00
|
|
|
# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
|
2013-06-15 13:48:07 +00:00
|
|
|
// All Win32 development environments, including 64-bit Windows and MinGW, define
|
2010-05-22 12:12:00 +00:00
|
|
|
// _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
|
2018-03-11 17:37:13 +03:00
|
|
|
// so does not define _WIN32 or its variants, but still supports dllexport/dllimport.
|
2010-05-22 12:12:00 +00:00
|
|
|
# define BOOST_HAS_DECLSPEC
|
2013-07-23 17:26:41 +00:00
|
|
|
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
|
|
|
|
|
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
|
2010-05-22 12:12:00 +00:00
|
|
|
# else
|
2013-07-23 17:26:41 +00:00
|
|
|
# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
|
2010-05-22 12:12:00 +00:00
|
|
|
# define BOOST_SYMBOL_IMPORT
|
|
|
|
|
# endif
|
2013-07-23 17:26:41 +00:00
|
|
|
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
|
2010-05-22 12:12:00 +00:00
|
|
|
#else
|
2013-06-07 20:05:18 +00:00
|
|
|
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
|
2010-05-22 12:12:00 +00:00
|
|
|
# define BOOST_SYMBOL_EXPORT
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-08-25 11:29:55 +00:00
|
|
|
//
|
|
|
|
|
// RTTI and typeinfo detection is possible post gcc-4.3:
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if BOOST_GCC_VERSION > 40300
|
2008-08-25 11:29:55 +00:00
|
|
|
# ifndef __GXX_RTTI
|
2010-06-29 16:02:13 +00:00
|
|
|
# ifndef BOOST_NO_TYPEID
|
|
|
|
|
# define BOOST_NO_TYPEID
|
|
|
|
|
# endif
|
|
|
|
|
# ifndef BOOST_NO_RTTI
|
|
|
|
|
# define BOOST_NO_RTTI
|
|
|
|
|
# endif
|
2008-08-25 11:29:55 +00:00
|
|
|
# endif
|
|
|
|
|
#endif
|
2002-11-04 01:59:32 +00:00
|
|
|
|
2012-10-25 12:21:19 +00:00
|
|
|
//
|
2013-02-19 17:49:35 +00:00
|
|
|
// Recent GCC versions have __int128 when in 64-bit mode.
|
|
|
|
|
//
|
2015-12-18 10:50:50 +01:00
|
|
|
// We disable this if the compiler is really nvcc with C++03 as it
|
2015-12-18 10:27:04 +01:00
|
|
|
// doesn't actually support __int128 as of CUDA_VERSION=7500
|
2013-06-07 20:05:18 +00:00
|
|
|
// even though it defines __SIZEOF_INT128__.
|
2013-02-19 17:49:35 +00:00
|
|
|
// See https://svn.boost.org/trac/boost/ticket/8048
|
2015-12-18 10:50:50 +01:00
|
|
|
// https://svn.boost.org/trac/boost/ticket/11852
|
2013-02-19 17:49:35 +00:00
|
|
|
// Only re-enable this for nvcc if you're absolutely sure
|
|
|
|
|
// of the circumstances under which it's supported:
|
2012-10-25 12:21:19 +00:00
|
|
|
//
|
2015-12-18 10:50:50 +01:00
|
|
|
#if defined(__CUDACC__)
|
|
|
|
|
# if defined(BOOST_GCC_CXX11)
|
|
|
|
|
# define BOOST_NVCC_CXX11
|
|
|
|
|
# else
|
|
|
|
|
# define BOOST_NVCC_CXX03
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03)
|
2012-10-25 12:21:19 +00:00
|
|
|
# define BOOST_HAS_INT128
|
|
|
|
|
#endif
|
2015-08-13 17:13:32 +01:00
|
|
|
//
|
|
|
|
|
// Recent GCC versions have a __float128 native type, we need to
|
|
|
|
|
// include a std lib header to detect this - not ideal, but we'll
|
|
|
|
|
// be including <cstddef> later anyway when we select the std lib.
|
|
|
|
|
//
|
2015-12-18 10:27:04 +01:00
|
|
|
// Nevertheless, as of CUDA 7.5, using __float128 with the host
|
2015-12-18 10:50:50 +01:00
|
|
|
// compiler in pre-C++11 mode is still not supported.
|
2015-12-18 10:27:04 +01:00
|
|
|
// See https://svn.boost.org/trac/boost/ticket/11852
|
|
|
|
|
//
|
2015-08-13 17:13:32 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
#include <cstddef>
|
|
|
|
|
#else
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
#endif
|
2015-12-18 10:50:50 +01:00
|
|
|
#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03)
|
2015-08-13 17:13:32 +01:00
|
|
|
# define BOOST_HAS_FLOAT128
|
|
|
|
|
#endif
|
2009-02-25 18:04:27 +00:00
|
|
|
|
2009-05-11 14:11:27 +00:00
|
|
|
// C++0x features in 4.3.n and later
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11)
|
2006-11-22 15:58:39 +00:00
|
|
|
// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
|
|
|
|
|
// passed on the command line, which in turn defines
|
2009-02-25 18:04:27 +00:00
|
|
|
// __GXX_EXPERIMENTAL_CXX0X__.
|
|
|
|
|
# define BOOST_HAS_DECLTYPE
|
|
|
|
|
# define BOOST_HAS_RVALUE_REFS
|
|
|
|
|
# define BOOST_HAS_STATIC_ASSERT
|
2009-04-14 09:03:13 +00:00
|
|
|
# define BOOST_HAS_VARIADIC_TMPL
|
2009-02-25 18:04:27 +00:00
|
|
|
#else
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_DECLTYPE
|
|
|
|
|
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
|
|
|
|
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
|
|
|
|
# define BOOST_NO_CXX11_STATIC_ASSERT
|
2006-11-22 15:58:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
2009-05-11 14:11:27 +00:00
|
|
|
// C++0x features in 4.4.n and later
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11)
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
|
|
|
|
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
|
|
|
|
# define BOOST_NO_CXX11_CHAR16_T
|
|
|
|
|
# define BOOST_NO_CXX11_CHAR32_T
|
2012-03-04 03:00:49 +00:00
|
|
|
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
|
|
|
|
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
2013-06-22 12:23:09 +00:00
|
|
|
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
|
|
|
|
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
2014-08-23 09:38:02 +01:00
|
|
|
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
2011-03-15 13:17:46 +00:00
|
|
|
#endif
|
2009-07-24 15:46:01 +00:00
|
|
|
|
2014-09-24 19:27:40 +01:00
|
|
|
#if BOOST_GCC_VERSION < 40500
|
2009-08-02 14:00:59 +00:00
|
|
|
# define BOOST_NO_SFINAE_EXPR
|
|
|
|
|
#endif
|
|
|
|
|
|
2013-06-15 17:34:04 +00:00
|
|
|
// GCC 4.5 forbids declaration of defaulted functions in private or protected sections
|
2014-09-24 19:27:40 +01:00
|
|
|
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11)
|
2013-06-15 17:34:04 +00:00
|
|
|
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-03-15 13:17:46 +00:00
|
|
|
// C++0x features in 4.5.0 and later
|
2009-08-02 14:00:59 +00:00
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11)
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
|
|
|
|
# define BOOST_NO_CXX11_LAMBDAS
|
|
|
|
|
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
|
|
|
|
# define BOOST_NO_CXX11_RAW_LITERALS
|
|
|
|
|
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
2009-08-02 14:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
2011-03-15 13:17:46 +00:00
|
|
|
// C++0x features in 4.5.1 and later
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11)
|
2012-07-10 13:57:24 +00:00
|
|
|
// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
|
2011-03-15 13:17:46 +00:00
|
|
|
// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
2011-03-15 13:17:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// C++0x features in 4.6.n and later
|
2010-11-15 09:26:29 +00:00
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
|
2018-01-04 00:58:32 +01:00
|
|
|
#define BOOST_NO_CXX11_DEFAULTED_MOVES
|
2012-07-10 13:57:24 +00:00
|
|
|
#define BOOST_NO_CXX11_NOEXCEPT
|
|
|
|
|
#define BOOST_NO_CXX11_NULLPTR
|
2012-07-10 19:10:08 +00:00
|
|
|
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
2012-07-10 13:57:24 +00:00
|
|
|
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
2010-11-15 09:26:29 +00:00
|
|
|
#endif
|
|
|
|
|
|
2013-03-29 03:22:28 +00:00
|
|
|
// C++0x features in 4.7.n and later
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
|
2018-11-07 18:12:32 +00:00
|
|
|
// Note that while constexpr is partly supported in gcc-4.6 it's a
|
|
|
|
|
// pre-std version with several bugs:
|
|
|
|
|
# define BOOST_NO_CXX11_CONSTEXPR
|
2014-08-15 16:04:42 -03:00
|
|
|
# define BOOST_NO_CXX11_FINAL
|
2012-07-10 13:57:24 +00:00
|
|
|
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
2013-04-28 18:11:43 +00:00
|
|
|
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
2014-08-25 18:37:18 +01:00
|
|
|
# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
|
2020-04-09 13:10:15 -04:00
|
|
|
# define BOOST_NO_CXX11_OVERRIDE
|
2012-04-25 17:18:23 +00:00
|
|
|
#endif
|
2013-03-29 03:22:28 +00:00
|
|
|
|
2013-06-15 13:48:07 +00:00
|
|
|
// C++0x features in 4.8.n and later
|
|
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
|
2016-07-02 09:09:19 +01:00
|
|
|
# define BOOST_NO_CXX11_THREAD_LOCAL
|
2017-02-03 23:57:44 -05:00
|
|
|
# define BOOST_NO_CXX11_SFINAE_EXPR
|
2013-06-15 13:48:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
2013-03-29 03:22:28 +00:00
|
|
|
// C++0x features in 4.8.1 and later
|
2011-06-01 14:51:03 +00:00
|
|
|
//
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11)
|
2013-03-29 03:22:28 +00:00
|
|
|
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
2014-05-28 17:33:28 +02:00
|
|
|
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
2014-10-12 15:39:25 +01:00
|
|
|
# define BOOST_NO_CXX14_BINARY_LITERALS
|
2013-03-29 03:22:28 +00:00
|
|
|
#endif
|
2011-06-01 14:51:03 +00:00
|
|
|
|
2020-03-01 12:59:03 +03:00
|
|
|
// C++0x features in 4.9.n and later
|
|
|
|
|
//
|
|
|
|
|
#if (BOOST_GCC_VERSION < 40900) || !defined(BOOST_GCC_CXX11)
|
|
|
|
|
// Although alignas support is added in gcc 4.8, it does not accept
|
2021-01-26 12:49:24 +03:00
|
|
|
// dependent constant expressions as an argument until gcc 4.9.
|
2020-03-01 12:59:03 +03:00
|
|
|
# define BOOST_NO_CXX11_ALIGNAS
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-12-11 00:33:25 -05:00
|
|
|
// C++0x features in 5.1 and later
|
|
|
|
|
//
|
|
|
|
|
#if (BOOST_GCC_VERSION < 50100) || !defined(BOOST_GCC_CXX11)
|
2019-12-11 21:58:12 -05:00
|
|
|
# define BOOST_NO_CXX11_UNRESTRICTED_UNION
|
2019-12-11 00:33:25 -05:00
|
|
|
#endif
|
|
|
|
|
|
2014-10-12 15:39:25 +01:00
|
|
|
// 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
|
2014-10-21 12:39:17 +01:00
|
|
|
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
|
2014-10-12 15:39:25 +01:00
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
|
2014-10-12 10:01:22 +01:00
|
|
|
// 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
|
2018-02-09 07:58:30 -05:00
|
|
|
#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
2014-10-12 10:01:22 +01:00
|
|
|
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-05-29 01:16:47 -04:00
|
|
|
// C++17
|
|
|
|
|
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
|
|
|
|
|
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
|
|
|
|
#endif
|
2017-05-29 09:34:41 -04:00
|
|
|
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
|
|
|
|
|
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
|
|
|
|
#endif
|
2017-05-29 10:15:41 -04:00
|
|
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
|
|
|
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
|
|
|
|
#endif
|
2018-03-06 00:53:15 -06:00
|
|
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
|
|
|
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
|
|
|
|
#endif
|
2017-05-29 01:16:47 -04:00
|
|
|
|
2017-06-11 17:50:15 -04:00
|
|
|
#if __GNUC__ >= 7
|
|
|
|
|
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-06-09 15:35:34 +02:00
|
|
|
#if (__GNUC__ < 11) && defined(__MINGW32__) && !defined(__MINGW64__)
|
|
|
|
|
// thread_local was broken on mingw for all 32bit compiler releases prior to 11.x, see
|
2017-06-14 19:32:59 +01:00
|
|
|
// https://sourceforge.net/p/mingw-w64/bugs/527/
|
2021-06-09 15:35:34 +02:00
|
|
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562
|
2017-06-14 19:32:59 +01:00
|
|
|
// Not setting this causes program termination on thread exit.
|
|
|
|
|
#define BOOST_NO_CXX11_THREAD_LOCAL
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-10-11 13:10:25 +01:00
|
|
|
//
|
|
|
|
|
// Unused attribute:
|
|
|
|
|
#if __GNUC__ >= 4
|
2015-09-03 19:02:48 +09:00
|
|
|
# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
|
2014-10-11 13:10:25 +01:00
|
|
|
#endif
|
2017-07-12 17:51:53 +03:00
|
|
|
|
|
|
|
|
// Type aliasing hint. Supported since gcc 3.3.
|
|
|
|
|
#define BOOST_MAY_ALIAS __attribute__((__may_alias__))
|
|
|
|
|
|
2015-09-16 18:27:48 +01:00
|
|
|
//
|
|
|
|
|
// __builtin_unreachable:
|
2019-03-26 00:41:31 +03:00
|
|
|
#if BOOST_GCC_VERSION >= 40500
|
2015-09-16 18:27:48 +01:00
|
|
|
#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
|
|
|
|
|
#endif
|
2014-10-11 13:10:25 +01:00
|
|
|
|
2011-03-15 13:17:46 +00:00
|
|
|
#ifndef BOOST_COMPILER
|
|
|
|
|
# define BOOST_COMPILER "GNU C++ version " __VERSION__
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-11-22 15:58:39 +00:00
|
|
|
// ConceptGCC compiler:
|
|
|
|
|
// http://www.generic-programming.org/software/ConceptGCC/
|
|
|
|
|
#ifdef __GXX_CONCEPTS__
|
2007-03-14 09:20:38 +00:00
|
|
|
# define BOOST_HAS_CONCEPTS
|
2006-12-19 20:14:43 +00:00
|
|
|
# define BOOST_COMPILER "ConceptGCC version " __VERSION__
|
2006-11-22 15:58:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
2001-09-18 11:13:39 +00:00
|
|
|
// versions check:
|
2013-08-10 12:43:07 +00:00
|
|
|
// we don't know gcc prior to version 3.30:
|
2014-09-24 19:27:40 +01:00
|
|
|
#if (BOOST_GCC_VERSION< 30300)
|
2001-09-18 11:13:39 +00:00
|
|
|
# error "Compiler not configured - please reconfigure"
|
|
|
|
|
#endif
|
|
|
|
|
//
|
2018-07-31 19:50:31 +01:00
|
|
|
// last known and checked version is 8.1:
|
|
|
|
|
#if (BOOST_GCC_VERSION > 80100)
|
2001-09-18 11:13:39 +00:00
|
|
|
# if defined(BOOST_ASSERT_CONFIG)
|
2017-08-17 17:51:48 +01:00
|
|
|
# error "Boost.Config is older than your compiler - please check for an updated Boost release."
|
2001-09-18 11:13:39 +00:00
|
|
|
# else
|
2005-05-12 16:28:44 +00:00
|
|
|
// we don't emit warnings here anymore since there are no defect macros defined for
|
|
|
|
|
// gcc post 3.4, so any failures are gcc regressions...
|
2018-07-12 09:23:53 +03:00
|
|
|
//# warning "boost: Unknown compiler version - please run the configure tests and report the results"
|
2001-09-18 11:13:39 +00:00
|
|
|
# endif
|
|
|
|
|
#endif
|
2003-04-11 10:47:00 +00:00
|
|
|
|