2011-02-11 20:37:03 +00:00
|
|
|
// (C) Copyright Christopher Jefferson 2011.
|
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
|
|
// config for libc++
|
|
|
|
|
// Might need more in here later.
|
|
|
|
|
|
2011-04-06 17:21:44 +00:00
|
|
|
#if !defined(_LIBCPP_VERSION)
|
2011-02-11 20:37:03 +00:00
|
|
|
# include <ciso646>
|
|
|
|
|
# if !defined(_LIBCPP_VERSION)
|
|
|
|
|
# error "This is not libc++!"
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
|
|
|
|
|
|
|
|
|
|
#define BOOST_HAS_THREADS
|
|
|
|
|
|
2011-02-12 23:05:03 +00:00
|
|
|
#ifdef _LIBCPP_HAS_NO_VARIADICS
|
2012-03-04 03:00:49 +00:00
|
|
|
# define BOOST_NO_CXX11_HDR_TUPLE
|
2011-02-12 23:05:03 +00:00
|
|
|
#endif
|
|
|
|
|
|
2014-05-08 11:13:43 -07:00
|
|
|
// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11
|
|
|
|
|
// allocator model. The C++11 allocator model requires a conforming
|
|
|
|
|
// std::allocator_traits which is only possible with C++11 template
|
|
|
|
|
// aliases since members rebind_alloc and rebind_traits require it.
|
|
|
|
|
#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
|
|
|
|
|
# define BOOST_NO_CXX11_ALLOCATOR
|
2017-05-17 01:07:18 -04:00
|
|
|
# define BOOST_NO_CXX11_POINTER_TRAITS
|
2014-05-08 11:13:43 -07:00
|
|
|
#endif
|
|
|
|
|
|
2014-10-04 08:32:52 +01:00
|
|
|
#if __cplusplus < 201103
|
2016-12-09 18:10:32 +00:00
|
|
|
//
|
|
|
|
|
// These two appear to be somewhat useable in C++03 mode, there may be others...
|
|
|
|
|
//
|
|
|
|
|
//# define BOOST_NO_CXX11_HDR_ARRAY
|
|
|
|
|
//# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
|
|
|
|
|
2014-09-14 18:27:19 +01:00
|
|
|
# define BOOST_NO_CXX11_HDR_CODECVT
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
2019-08-23 12:45:33 +01:00
|
|
|
# define BOOST_NO_CXX11_HDR_EXCEPTION
|
2014-09-14 18:27:19 +01:00
|
|
|
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_MUTEX
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_RANDOM
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_RATIO
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_REGEX
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_THREAD
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_TUPLE
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
|
|
|
|
# define BOOST_NO_CXX11_NUMERIC_LIMITS
|
|
|
|
|
# define BOOST_NO_CXX11_ALLOCATOR
|
2017-05-17 01:07:18 -04:00
|
|
|
# define BOOST_NO_CXX11_POINTER_TRAITS
|
2014-09-14 18:27:19 +01:00
|
|
|
# define BOOST_NO_CXX11_SMART_PTR
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
|
|
|
|
# define BOOST_NO_CXX11_STD_ALIGN
|
|
|
|
|
# define BOOST_NO_CXX11_ADDRESSOF
|
2016-01-01 16:01:16 +00:00
|
|
|
# define BOOST_NO_CXX11_HDR_ATOMIC
|
2016-01-03 14:12:01 +00:00
|
|
|
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_CHRONO
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_FUTURE
|
2016-01-01 16:01:16 +00:00
|
|
|
#elif _LIBCPP_VERSION < 3700
|
2011-03-17 11:43:20 +00:00
|
|
|
//
|
|
|
|
|
// These appear to be unusable/incomplete so far:
|
|
|
|
|
//
|
2016-01-03 14:12:01 +00:00
|
|
|
# define BOOST_NO_CXX11_HDR_ATOMIC
|
|
|
|
|
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
2012-03-04 03:00:49 +00:00
|
|
|
# define BOOST_NO_CXX11_HDR_CHRONO
|
|
|
|
|
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
2016-01-03 14:12:01 +00:00
|
|
|
# define BOOST_NO_CXX11_HDR_FUTURE
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-03-17 11:43:20 +00:00
|
|
|
|
2016-01-03 14:12:01 +00:00
|
|
|
#if _LIBCPP_VERSION < 3700
|
2011-02-14 10:29:12 +00:00
|
|
|
// libc++ uses a non-standard messages_base
|
|
|
|
|
#define BOOST_NO_STD_MESSAGES
|
2016-11-21 17:53:34 -08:00
|
|
|
#endif
|
|
|
|
|
|
2016-12-12 19:41:30 +01:00
|
|
|
// C++14 features
|
|
|
|
|
#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
|
|
|
|
|
# define BOOST_NO_CXX14_STD_EXCHANGE
|
|
|
|
|
#endif
|
|
|
|
|
|
2016-10-14 20:49:48 +02:00
|
|
|
// C++17 features
|
2016-12-11 12:25:53 +01:00
|
|
|
#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
|
|
|
|
|
# define BOOST_NO_CXX17_STD_APPLY
|
2018-08-04 19:21:21 +01:00
|
|
|
# define BOOST_NO_CXX17_HDR_OPTIONAL
|
2018-08-16 11:25:16 +01:00
|
|
|
# define BOOST_NO_CXX17_HDR_STRING_VIEW
|
2019-04-01 19:08:54 +01:00
|
|
|
# define BOOST_NO_CXX17_HDR_VARIANT
|
2016-12-11 12:25:53 +01:00
|
|
|
#endif
|
2017-05-19 12:22:13 -06:00
|
|
|
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
|
|
|
|
|
# define BOOST_NO_AUTO_PTR
|
|
|
|
|
#endif
|
2017-08-06 17:53:56 -07:00
|
|
|
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
|
|
|
|
|
# define BOOST_NO_CXX98_RANDOM_SHUFFLE
|
|
|
|
|
#endif
|
2017-08-07 06:11:30 -07:00
|
|
|
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
|
2017-08-06 17:53:56 -07:00
|
|
|
# define BOOST_NO_CXX98_BINDERS
|
|
|
|
|
#endif
|
2011-02-14 10:29:12 +00:00
|
|
|
|
2022-02-24 11:38:17 +00:00
|
|
|
#if defined(__cplusplus) && defined(__has_include)
|
2021-02-03 17:46:25 +00:00
|
|
|
#if __has_include(<version>)
|
2021-03-05 11:54:43 +00:00
|
|
|
#include <version>
|
2021-02-03 17:46:25 +00:00
|
|
|
|
|
|
|
|
#if !defined(__cpp_lib_execution) || (__cpp_lib_execution < 201603L)
|
|
|
|
|
# define BOOST_NO_CXX17_HDR_EXECUTION
|
|
|
|
|
#endif
|
|
|
|
|
#if !defined(__cpp_lib_invoke) || (__cpp_lib_invoke < 201411L)
|
|
|
|
|
#define BOOST_NO_CXX17_STD_INVOKE
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-02-03 18:54:20 +00:00
|
|
|
#if(_LIBCPP_VERSION < 9000)
|
2021-03-05 12:59:22 +00:00
|
|
|
// as_writable_bytes is missing.
|
2021-03-05 16:18:05 +00:00
|
|
|
# define BOOST_NO_CXX20_HDR_SPAN
|
2021-03-05 12:59:22 +00:00
|
|
|
#endif
|
|
|
|
|
|
2021-02-03 17:46:25 +00:00
|
|
|
#else
|
2018-04-04 18:37:59 +01:00
|
|
|
#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result)
|
2021-02-03 17:46:25 +00:00
|
|
|
#define BOOST_NO_CXX17_HDR_EXECUTION
|
|
|
|
|
#endif
|
|
|
|
|
#else
|
|
|
|
|
#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result)
|
|
|
|
|
#define BOOST_NO_CXX17_HDR_EXECUTION
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if _LIBCPP_VERSION < 10000 // What's the correct version check here?
|
|
|
|
|
#define BOOST_NO_CXX17_ITERATOR_TRAITS
|
|
|
|
|
#endif
|
2017-07-09 17:06:34 +03:00
|
|
|
|
2016-08-18 19:26:28 +01:00
|
|
|
#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
|
|
|
|
|
// This is a bit of a sledgehammer, because really it's just libc++abi that has no
|
|
|
|
|
// support for thread_local, leading to linker errors such as
|
|
|
|
|
// "undefined reference to `__cxa_thread_atexit'". It is fixed in the
|
|
|
|
|
// most recent releases of libc++abi though...
|
|
|
|
|
# define BOOST_NO_CXX11_THREAD_LOCAL
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-08-04 17:55:58 +01:00
|
|
|
#if defined(__linux__) && (_LIBCPP_VERSION < 6000) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
|
2018-01-18 21:45:06 +02:00
|
|
|
// After libc++-dev is installed on Trusty, clang++-libc++ almost works,
|
|
|
|
|
// except uses of `thread_local` fail with undefined reference to
|
|
|
|
|
// `__cxa_thread_atexit`.
|
2018-08-04 08:25:09 +01:00
|
|
|
//
|
|
|
|
|
// clang's libc++abi provides an implementation by deferring to the glibc
|
|
|
|
|
// implementation, which may or may not be available (it is not on Trusty).
|
|
|
|
|
// clang 4's libc++abi will provide an implementation if one is not in glibc
|
|
|
|
|
// though, so thread local support should work with clang 4 and above as long
|
|
|
|
|
// as libc++abi is linked in.
|
2018-01-18 21:45:06 +02:00
|
|
|
# define BOOST_NO_CXX11_THREAD_LOCAL
|
|
|
|
|
#endif
|
|
|
|
|
|
2015-06-15 09:56:54 -04:00
|
|
|
#if defined(__has_include)
|
|
|
|
|
#if !__has_include(<shared_mutex>)
|
2015-06-09 22:43:10 -04:00
|
|
|
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
2015-06-30 23:42:05 -04:00
|
|
|
#elif __cplusplus <= 201103
|
|
|
|
|
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
2015-06-15 09:56:54 -04:00
|
|
|
#endif
|
2015-06-09 22:43:10 -04:00
|
|
|
#elif __cplusplus < 201402
|
|
|
|
|
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-08-05 08:31:18 +01:00
|
|
|
#if !defined(BOOST_NO_CXX14_HDR_SHARED_MUTEX) && (_LIBCPP_VERSION < 5000)
|
|
|
|
|
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-07-11 18:26:07 +01:00
|
|
|
#if _LIBCPP_VERSION >= 15000
|
|
|
|
|
//
|
|
|
|
|
// Unary function is now deprecated in C++11 and later:
|
|
|
|
|
//
|
|
|
|
|
#if __cplusplus >= 201103L
|
|
|
|
|
#define BOOST_NO_CXX98_FUNCTION_BASE
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-02-11 20:37:03 +00:00
|
|
|
// --- end ---
|