summaryrefslogtreecommitdiffstats
path: root/contrib/src/boost/config/stdlib/libcpp.hpp
blob: b2af723e51c11cf205ae7566c75ce962733d612f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//  (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.


#if !defined(_LIBCPP_VERSION)

#  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


#ifdef _LIBCPP_HAS_NO_VARIADICS

#    define BOOST_NO_CXX11_HDR_TUPLE

#endif


// 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

#endif


#if __cplusplus < 201103

//

// 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


#  define BOOST_NO_CXX11_HDR_CODECVT

#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE

#  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

#  define BOOST_NO_CXX11_SMART_PTR

#  define BOOST_NO_CXX11_HDR_FUNCTIONAL

#  define BOOST_NO_CXX11_STD_ALIGN

#  define BOOST_NO_CXX11_ADDRESSOF

#  define BOOST_NO_CXX11_HDR_ATOMIC

#  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

#elif _LIBCPP_VERSION < 3700

//

// These appear to be unusable/incomplete so far:

//

#  define BOOST_NO_CXX11_HDR_ATOMIC

#  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

#endif



#if _LIBCPP_VERSION < 3700

// libc++ uses a non-standard messages_base

#define BOOST_NO_STD_MESSAGES

#endif


// C++14 features

#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)

#  define BOOST_NO_CXX14_STD_EXCHANGE

#endif


// C++17 features

#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)

#  define BOOST_NO_CXX17_STD_INVOKE

#endif

#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)

#  define BOOST_NO_CXX17_STD_APPLY

#endif


#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


#if defined(__has_include)

#if !__has_include(<shared_mutex>)

#  define BOOST_NO_CXX14_HDR_SHARED_MUTEX

#elif __cplusplus <= 201103

#  define BOOST_NO_CXX14_HDR_SHARED_MUTEX

#endif

#elif __cplusplus < 201402

#  define BOOST_NO_CXX14_HDR_SHARED_MUTEX

#endif


//  --- end ---