1 // (C) Copyright Christopher Jefferson 2011.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org for most recent version.
9 // Might need more in here later.
11 #if !defined(_LIBCPP_VERSION)
13 # if !defined(_LIBCPP_VERSION)
14 # error "This is not libc++!"
18 #define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
20 #define BOOST_HAS_THREADS
22 #ifdef _LIBCPP_HAS_NO_VARIADICS
23 # define BOOST_NO_CXX11_HDR_TUPLE
26 // BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11
27 // allocator model. The C++11 allocator model requires a conforming
28 // std::allocator_traits which is only possible with C++11 template
29 // aliases since members rebind_alloc and rebind_traits require it.
30 #if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
31 # define BOOST_NO_CXX11_ALLOCATOR
34 #if __cplusplus < 201103
35 # define BOOST_NO_CXX11_HDR_ARRAY
36 # define BOOST_NO_CXX11_HDR_CODECVT
37 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
38 # define BOOST_NO_CXX11_HDR_FORWARD_LIST
39 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
40 # define BOOST_NO_CXX11_HDR_MUTEX
41 # define BOOST_NO_CXX11_HDR_RANDOM
42 # define BOOST_NO_CXX11_HDR_RATIO
43 # define BOOST_NO_CXX11_HDR_REGEX
44 # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
45 # define BOOST_NO_CXX11_HDR_THREAD
46 # define BOOST_NO_CXX11_HDR_TUPLE
47 # define BOOST_NO_CXX11_HDR_TYPEINDEX
48 # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
49 # define BOOST_NO_CXX11_HDR_UNORDERED_SET
50 # define BOOST_NO_CXX11_NUMERIC_LIMITS
51 # define BOOST_NO_CXX11_ALLOCATOR
52 # define BOOST_NO_CXX11_SMART_PTR
53 # define BOOST_NO_CXX11_HDR_FUNCTIONAL
54 # define BOOST_NO_CXX11_STD_ALIGN
55 # define BOOST_NO_CXX11_ADDRESSOF
56 # define BOOST_NO_CXX11_HDR_ATOMIC
57 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
58 # define BOOST_NO_CXX11_HDR_CHRONO
59 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
60 # define BOOST_NO_CXX11_HDR_FUTURE
61 #elif _LIBCPP_VERSION < 3700
63 // These appear to be unusable/incomplete so far:
65 # define BOOST_NO_CXX11_HDR_ATOMIC
66 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
67 # define BOOST_NO_CXX11_HDR_CHRONO
68 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
69 # define BOOST_NO_CXX11_HDR_FUTURE
73 #if _LIBCPP_VERSION < 3700
74 // libc++ uses a non-standard messages_base
75 #define BOOST_NO_STD_MESSAGES
77 #define BOOST_NO_CXX17_STD_INVOKE
80 #if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
81 // This is a bit of a sledgehammer, because really it's just libc++abi that has no
82 // support for thread_local, leading to linker errors such as
83 // "undefined reference to `__cxa_thread_atexit'". It is fixed in the
84 // most recent releases of libc++abi though...
85 # define BOOST_NO_CXX11_THREAD_LOCAL
88 #if defined(__has_include)
89 #if !__has_include(<shared_mutex>)
90 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
91 #elif __cplusplus <= 201103
92 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
94 #elif __cplusplus < 201402
95 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX