libstdcpp3.hpp
Go to the documentation of this file.
1 // (C) Copyright John Maddock 2001.
2 // (C) Copyright Jens Maurer 2001.
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 
7 // See http://www.boost.org for most recent version.
8 
9 // config for libstdc++ v3
10 // not much to go in here:
11 
12 #define BOOST_GNU_STDLIB 1
13 
14 #ifdef __GLIBCXX__
15 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
16 #else
17 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
18 #endif
19 
20 #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
21 # define BOOST_NO_CWCHAR
22 # define BOOST_NO_CWCTYPE
23 # define BOOST_NO_STD_WSTRING
24 # define BOOST_NO_STD_WSTREAMBUF
25 #endif
26 
27 #if defined(__osf__) && !defined(_REENTRANT) \
28  && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
29 // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
30 // file is included, therefore for consistency we define it here as well.
31 # define _REENTRANT
32 #endif
33 
34 #ifdef __GLIBCXX__ // gcc 3.4 and greater:
35 # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
36  || defined(_GLIBCXX__PTHREADS) \
37  || defined(_GLIBCXX_HAS_GTHREADS) \
38  || defined(_WIN32) \
39  || defined(_AIX) \
40  || defined(__HAIKU__)
41  //
42  // If the std lib has thread support turned on, then turn it on in Boost
43  // as well. We do this because some gcc-3.4 std lib headers define _REENTANT
44  // while others do not...
45  //
46 # define BOOST_HAS_THREADS
47 # else
48 # define BOOST_DISABLE_THREADS
49 # endif
50 #elif defined(__GLIBCPP__) \
51  && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
52  && !defined(_GLIBCPP__PTHREADS)
53  // disable thread support if the std lib was built single threaded:
54 # define BOOST_DISABLE_THREADS
55 #endif
56 
57 #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
58 // linux on arm apparently doesn't define _REENTRANT
59 // so just turn on threading support whenever the std lib is thread safe:
60 # define BOOST_HAS_THREADS
61 #endif
62 
63 #if !defined(_GLIBCPP_USE_LONG_LONG) \
64  && !defined(_GLIBCXX_USE_LONG_LONG)\
65  && defined(BOOST_HAS_LONG_LONG)
66 // May have been set by compiler/*.hpp, but "long long" without library
67 // support is useless.
68 # undef BOOST_HAS_LONG_LONG
69 #endif
70 
71 // Apple doesn't seem to reliably defined a *unix* macro
72 #if !defined(CYGWIN) && ( defined(__unix__) \
73  || defined(__unix) \
74  || defined(unix) \
75  || defined(__APPLE__) \
76  || defined(__APPLE) \
77  || defined(APPLE))
78 # include <unistd.h>
79 #endif
80 
81 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
82 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
83 # define BOOST_HAS_SLIST
84 # define BOOST_HAS_HASH
85 # define BOOST_SLIST_HEADER <ext/slist>
86 # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
87 # define BOOST_HASH_SET_HEADER <ext/hash_set>
88 # define BOOST_HASH_MAP_HEADER <ext/hash_map>
89 # else
90 # define BOOST_HASH_SET_HEADER <backward/hash_set>
91 # define BOOST_HASH_MAP_HEADER <backward/hash_map>
92 # endif
93 #endif
94 
95 //
96 // Decide whether we have C++11 support turned on:
97 //
98 #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
99 # define BOOST_LIBSTDCXX11
100 #endif
101 //
102 // Decide which version of libstdc++ we have, normally
103 // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
104 // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++
105 // developers. He also commented:
106 //
107 // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in
108 // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.
109 // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support
110 // than any release in the 4.2 series."
111 //
112 // Another resource for understanding stdlibc++ features is:
113 // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
114 //
115 // However, using the GCC version number fails when the compiler is clang since this
116 // only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473
117 // for a long discussion on this issue. What we can do though is use clang's __has_include
118 // to detect the presence of a C++11 header that was introduced with a specific GCC release.
119 // We still have to be careful though as many such headers were buggy and/or incomplete when
120 // first introduced, so we only check for headers that were fully featured from day 1, and then
121 // use that to infer the underlying GCC version:
122 //
123 #ifdef __clang__
124 
125 #if __has_include(<experimental/any>)
126 # define BOOST_LIBSTDCXX_VERSION 50100
127 #elif __has_include(<shared_mutex>)
128 # define BOOST_LIBSTDCXX_VERSION 40900
129 #elif __has_include(<ext/cmath>)
130 # define BOOST_LIBSTDCXX_VERSION 40800
131 #elif __has_include(<scoped_allocator>)
132 # define BOOST_LIBSTDCXX_VERSION 40700
133 #elif __has_include(<typeindex>)
134 # define BOOST_LIBSTDCXX_VERSION 40600
135 #elif __has_include(<future>)
136 # define BOOST_LIBSTDCXX_VERSION 40500
137 #elif __has_include(<ratio>)
138 # define BOOST_LIBSTDCXX_VERSION 40400
139 #elif __has_include(<array>)
140 # define BOOST_LIBSTDCXX_VERSION 40300
141 #endif
142 //
143 // GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively.
144 // However, we have no test for these as the headers were present but broken
145 // in early GCC versions.
146 //
147 #endif
148 
149 #if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L)
150 //
151 // Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't
152 // set __GNUC__
153 //
154 #if __SUNPRO_CC >= 0x5140
155 #define BOOST_LIBSTDCXX_VERSION 50100
156 #else
157 #define BOOST_LIBSTDCXX_VERSION 40800
158 #endif
159 #endif
160 
161 #if !defined(BOOST_LIBSTDCXX_VERSION)
162 # define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
163 #endif
164 
165 // std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier)
166 // or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later).
167 #if defined(BOOST_LIBSTDCXX11)
168 # if BOOST_LIBSTDCXX_VERSION < 40600
169 # if !_GLIBCXX_DEPRECATED
170 # define BOOST_NO_AUTO_PTR
171 # endif
172 # elif !_GLIBCXX_USE_DEPRECATED
173 # define BOOST_NO_AUTO_PTR
174 # endif
175 #endif
176 
177 // C++0x headers in GCC 4.3.0 and later
178 //
179 #if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11)
180 # define BOOST_NO_CXX11_HDR_ARRAY
181 # define BOOST_NO_CXX11_HDR_TUPLE
182 # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
183 # define BOOST_NO_CXX11_HDR_UNORDERED_SET
184 # define BOOST_NO_CXX11_HDR_FUNCTIONAL
185 #endif
186 
187 // C++0x headers in GCC 4.4.0 and later
188 //
189 #if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11)
190 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
191 # define BOOST_NO_CXX11_HDR_FORWARD_LIST
192 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
193 # define BOOST_NO_CXX11_HDR_MUTEX
194 # define BOOST_NO_CXX11_HDR_RATIO
195 # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
196 # define BOOST_NO_CXX11_SMART_PTR
197 #else
198 # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
199 # define BOOST_HAS_TR1_COMPLEX_OVERLOADS
200 #endif
201 
202 // C++0x features in GCC 4.5.0 and later
203 //
204 #if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11)
205 # define BOOST_NO_CXX11_NUMERIC_LIMITS
206 # define BOOST_NO_CXX11_HDR_FUTURE
207 # define BOOST_NO_CXX11_HDR_RANDOM
208 #endif
209 
210 // C++0x features in GCC 4.6.0 and later
211 //
212 #if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11)
213 # define BOOST_NO_CXX11_HDR_TYPEINDEX
214 # define BOOST_NO_CXX11_ADDRESSOF
215 #endif
216 
217 // C++0x features in GCC 4.7.0 and later
218 //
219 #if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11)
220 // Note that although <chrono> existed prior to 4.7, "steady_clock" is spelled "monotonic_clock"
221 // so 4.7.0 is the first truely conforming one.
222 # define BOOST_NO_CXX11_HDR_CHRONO
223 # define BOOST_NO_CXX11_ALLOCATOR
224 #endif
225 // C++0x features in GCC 4.8.0 and later
226 //
227 #if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11)
228 // Note that although <atomic> existed prior to gcc 4.8 it was largely unimplemented for many types:
229 # define BOOST_NO_CXX11_HDR_ATOMIC
230 # define BOOST_NO_CXX11_HDR_THREAD
231 #endif
232 // C++0x features in GCC 4.9.0 and later
233 //
234 #if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11)
235 // Although <regex> is present and compilable against, the actual implementation is not functional
236 // even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively.
237 # define BOOST_NO_CXX11_HDR_REGEX
238 #endif
239 
240 #if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))
241 // As of clang-3.6, libstdc++ header <atomic> throws up errors with clang:
242 # define BOOST_NO_CXX11_HDR_ATOMIC
243 #endif
244 //
245 // C++0x features in GCC 5.1 and later
246 //
247 #if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11)
248 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
249 # define BOOST_NO_CXX11_HDR_CODECVT
250 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
251 # define BOOST_NO_CXX11_STD_ALIGN
252 #endif
253 
254 #if defined(__has_include)
255 #if !__has_include(<shared_mutex>)
256 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
257 #elif __cplusplus <= 201103
258 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
259 #endif
260 #elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11)
261 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
262 #endif
263 
264 //
265 // Headers not present on Solaris with the Oracle compiler:
266 #if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
267 #define BOOST_NO_CXX11_HDR_FUTURE
268 #define BOOST_NO_CXX11_HDR_FORWARD_LIST
269 #define BOOST_NO_CXX11_HDR_ATOMIC
270 // shared_ptr is present, but is not convertible to bool
271 // which causes all kinds of problems especially in Boost.Thread
272 // but probably elsewhere as well.
273 #define BOOST_NO_CXX11_SMART_PTR
274 #endif
275 
276 #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1))
277  // Headers not always available:
278 # ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
279 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
280 # endif
281 # ifndef BOOST_NO_CXX11_HDR_MUTEX
282 # define BOOST_NO_CXX11_HDR_MUTEX
283 # endif
284 # ifndef BOOST_NO_CXX11_HDR_THREAD
285 # define BOOST_NO_CXX11_HDR_THREAD
286 # endif
287 # ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
288 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
289 # endif
290 #endif
291 
292 #if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX)
293 // Timed mutexes are not always available:
294 # define BOOST_NO_CXX11_HDR_MUTEX
295 #endif
296 
297 // --- end ---


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:42:04