xref: /netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/c++config (revision a8c74629f602faa0ccf8a463757d7baf858bbf3a)
1// Predefined symbols and macros -*- C++ -*-
2
3// Copyright (C) 1997-2019 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library.  This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file bits/c++config.h
26 *  This is an internal header file, included by other library headers.
27 *  Do not attempt to use it directly. @headername{version}
28 */
29
30#ifndef _GLIBCXX_CXX_CONFIG_H
31#define _GLIBCXX_CXX_CONFIG_H 1
32
33// The major release number for the GCC release the C++ library belongs to.
34#define _GLIBCXX_RELEASE
35
36// The datestamp of the C++ library in compressed ISO date format.
37#define __GLIBCXX__
38
39// Macros for various attributes.
40//   _GLIBCXX_PURE
41//   _GLIBCXX_CONST
42//   _GLIBCXX_NORETURN
43//   _GLIBCXX_NOTHROW
44//   _GLIBCXX_VISIBILITY
45#ifndef _GLIBCXX_PURE
46# define _GLIBCXX_PURE __attribute__ ((__pure__))
47#endif
48
49#ifndef _GLIBCXX_CONST
50# define _GLIBCXX_CONST __attribute__ ((__const__))
51#endif
52
53#ifndef _GLIBCXX_NORETURN
54# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
55#endif
56
57// See below for C++
58#ifndef _GLIBCXX_NOTHROW
59# ifndef __cplusplus
60#  define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
61# endif
62#endif
63
64// Macros for visibility attributes.
65//   _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
66//   _GLIBCXX_VISIBILITY
67#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
68
69#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
70# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
71#else
72// If this is not supplied by the OS-specific or CPU-specific
73// headers included below, it will be defined to an empty default.
74# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
75#endif
76
77// Macros for deprecated attributes.
78//   _GLIBCXX_USE_DEPRECATED
79//   _GLIBCXX_DEPRECATED
80//   _GLIBCXX17_DEPRECATED
81#ifndef _GLIBCXX_USE_DEPRECATED
82# define _GLIBCXX_USE_DEPRECATED 1
83#endif
84
85#if defined(__DEPRECATED) && (__cplusplus >= 201103L)
86# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__))
87#else
88# define _GLIBCXX_DEPRECATED
89#endif
90
91#if defined(__DEPRECATED) && (__cplusplus >= 201703L)
92# define _GLIBCXX17_DEPRECATED [[__deprecated__]]
93#else
94# define _GLIBCXX17_DEPRECATED
95#endif
96
97// Macros for ABI tag attributes.
98#ifndef _GLIBCXX_ABI_TAG_CXX11
99# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11")))
100#endif
101
102// Macro to warn about unused results.
103#if __cplusplus >= 201703L
104# define _GLIBCXX_NODISCARD [[__nodiscard__]]
105#else
106# define _GLIBCXX_NODISCARD
107#endif
108
109
110
111#if __cplusplus
112
113// Macro for constexpr, to support in mixed 03/0x mode.
114#ifndef _GLIBCXX_CONSTEXPR
115# if __cplusplus >= 201103L
116#  define _GLIBCXX_CONSTEXPR constexpr
117#  define _GLIBCXX_USE_CONSTEXPR constexpr
118# else
119#  define _GLIBCXX_CONSTEXPR
120#  define _GLIBCXX_USE_CONSTEXPR const
121# endif
122#endif
123
124#ifndef _GLIBCXX14_CONSTEXPR
125# if __cplusplus >= 201402L
126#  define _GLIBCXX14_CONSTEXPR constexpr
127# else
128#  define _GLIBCXX14_CONSTEXPR
129# endif
130#endif
131
132#ifndef _GLIBCXX17_CONSTEXPR
133# if __cplusplus >= 201703L
134#  define _GLIBCXX17_CONSTEXPR constexpr
135# else
136#  define _GLIBCXX17_CONSTEXPR
137# endif
138#endif
139
140#ifndef _GLIBCXX20_CONSTEXPR
141# if __cplusplus > 201703L
142#  define _GLIBCXX20_CONSTEXPR constexpr
143# else
144#  define _GLIBCXX20_CONSTEXPR
145# endif
146#endif
147
148#ifndef _GLIBCXX17_INLINE
149# if __cplusplus >= 201703L
150#  define _GLIBCXX17_INLINE inline
151# else
152#  define _GLIBCXX17_INLINE
153# endif
154#endif
155
156// Macro for noexcept, to support in mixed 03/0x mode.
157#ifndef _GLIBCXX_NOEXCEPT
158# if __cplusplus >= 201103L
159#  define _GLIBCXX_NOEXCEPT noexcept
160#  define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND)
161#  define _GLIBCXX_USE_NOEXCEPT noexcept
162#  define _GLIBCXX_THROW(_EXC)
163# else
164#  define _GLIBCXX_NOEXCEPT
165#  define _GLIBCXX_NOEXCEPT_IF(_COND)
166#  define _GLIBCXX_USE_NOEXCEPT throw()
167#  define _GLIBCXX_THROW(_EXC) throw(_EXC)
168# endif
169#endif
170
171#ifndef _GLIBCXX_NOTHROW
172# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT
173#endif
174
175#ifndef _GLIBCXX_THROW_OR_ABORT
176# if __cpp_exceptions
177#  define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC))
178# else
179#  define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort())
180# endif
181#endif
182
183#if __cpp_noexcept_function_type
184#define _GLIBCXX_NOEXCEPT_PARM , bool _NE
185#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE)
186#else
187#define _GLIBCXX_NOEXCEPT_PARM
188#define _GLIBCXX_NOEXCEPT_QUAL
189#endif
190
191// Macro for extern template, ie controlling template linkage via use
192// of extern keyword on template declaration. As documented in the g++
193// manual, it inhibits all implicit instantiations and is used
194// throughout the library to avoid multiple weak definitions for
195// required types that are already explicitly instantiated in the
196// library binary. This substantially reduces the binary size of
197// resulting executables.
198// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern
199// templates only in basic_string, thus activating its debug-mode
200// checks even at -O0.
201#define _GLIBCXX_EXTERN_TEMPLATE
202
203/*
204  Outline of libstdc++ namespaces.
205
206  namespace std
207  {
208    namespace __debug { }
209    namespace __parallel { }
210    namespace __profile { }
211    namespace __cxx1998 { }
212
213    namespace __detail {
214      namespace __variant { }				// C++17
215    }
216
217    namespace rel_ops { }
218
219    namespace tr1
220    {
221      namespace placeholders { }
222      namespace regex_constants { }
223      namespace __detail { }
224    }
225
226    namespace tr2 { }
227
228    namespace decimal { }
229
230    namespace chrono { }				// C++11
231    namespace placeholders { }				// C++11
232    namespace regex_constants { }			// C++11
233    namespace this_thread { }				// C++11
234    inline namespace literals {				// C++14
235      inline namespace chrono_literals { }		// C++14
236      inline namespace complex_literals { }		// C++14
237      inline namespace string_literals { }		// C++14
238      inline namespace string_view_literals { }		// C++17
239    }
240  }
241
242  namespace abi { }
243
244  namespace __gnu_cxx
245  {
246    namespace __detail { }
247  }
248
249  For full details see:
250  http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html
251*/
252namespace std
253{
254  typedef __SIZE_TYPE__ 	size_t;
255  typedef __PTRDIFF_TYPE__	ptrdiff_t;
256
257#if __cplusplus >= 201103L
258  typedef decltype(nullptr)	nullptr_t;
259#endif
260}
261
262#define _GLIBCXX_USE_DUAL_ABI
263
264#if ! _GLIBCXX_USE_DUAL_ABI
265// Ignore any pre-defined value of _GLIBCXX_USE_CXX11_ABI
266# undef _GLIBCXX_USE_CXX11_ABI
267#endif
268
269#ifndef _GLIBCXX_USE_CXX11_ABI
270#define _GLIBCXX_USE_CXX11_ABI
271#endif
272
273#if _GLIBCXX_USE_CXX11_ABI
274namespace std
275{
276  inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
277}
278namespace __gnu_cxx
279{
280  inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
281}
282# define _GLIBCXX_NAMESPACE_CXX11 __cxx11::
283# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 {
284# define _GLIBCXX_END_NAMESPACE_CXX11 }
285# define _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_ABI_TAG_CXX11
286#else
287# define _GLIBCXX_NAMESPACE_CXX11
288# define _GLIBCXX_BEGIN_NAMESPACE_CXX11
289# define _GLIBCXX_END_NAMESPACE_CXX11
290# define _GLIBCXX_DEFAULT_ABI_TAG
291#endif
292
293// Defined if inline namespaces are used for versioning.
294#define _GLIBCXX_INLINE_VERSION
295
296// Inline namespace for symbol versioning.
297#if _GLIBCXX_INLINE_VERSION
298# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __8 {
299# define _GLIBCXX_END_NAMESPACE_VERSION }
300
301namespace std
302{
303inline _GLIBCXX_BEGIN_NAMESPACE_VERSION
304#if __cplusplus >= 201402L
305  inline namespace literals {
306    inline namespace chrono_literals { }
307    inline namespace complex_literals { }
308    inline namespace string_literals { }
309#if __cplusplus > 201402L
310    inline namespace string_view_literals { }
311#endif // C++17
312  }
313#endif // C++14
314_GLIBCXX_END_NAMESPACE_VERSION
315}
316
317namespace __gnu_cxx
318{
319inline _GLIBCXX_BEGIN_NAMESPACE_VERSION
320_GLIBCXX_END_NAMESPACE_VERSION
321}
322
323#else
324# define _GLIBCXX_BEGIN_NAMESPACE_VERSION
325# define _GLIBCXX_END_NAMESPACE_VERSION
326#endif
327
328// Inline namespaces for special modes: debug, parallel, profile.
329#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \
330    || defined(_GLIBCXX_PROFILE)
331namespace std
332{
333_GLIBCXX_BEGIN_NAMESPACE_VERSION
334
335  // Non-inline namespace for components replaced by alternates in active mode.
336  namespace __cxx1998
337  {
338# if _GLIBCXX_USE_CXX11_ABI
339  inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
340# endif
341  }
342
343_GLIBCXX_END_NAMESPACE_VERSION
344
345  // Inline namespace for debug mode.
346# ifdef _GLIBCXX_DEBUG
347  inline namespace __debug { }
348# endif
349
350  // Inline namespaces for parallel mode.
351# ifdef _GLIBCXX_PARALLEL
352  inline namespace __parallel { }
353# endif
354
355  // Inline namespaces for profile mode
356# ifdef _GLIBCXX_PROFILE
357  inline namespace __profile { }
358# endif
359}
360
361// Check for invalid usage and unsupported mixed-mode use.
362# if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL)
363#  error illegal use of multiple inlined namespaces
364# endif
365# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG)
366#  error illegal use of multiple inlined namespaces
367# endif
368# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL)
369#  error illegal use of multiple inlined namespaces
370# endif
371
372// Check for invalid use due to lack for weak symbols.
373# if __NO_INLINE__ && !__GXX_WEAK__
374#  warning currently using inlined namespace mode which may fail \
375   without inlining due to lack of weak symbols
376# endif
377#endif
378
379// Macros for namespace scope. Either namespace std:: or the name
380// of some nested namespace within it corresponding to the active mode.
381// _GLIBCXX_STD_A
382// _GLIBCXX_STD_C
383//
384// Macros for opening/closing conditional namespaces.
385// _GLIBCXX_BEGIN_NAMESPACE_ALGO
386// _GLIBCXX_END_NAMESPACE_ALGO
387// _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
388// _GLIBCXX_END_NAMESPACE_CONTAINER
389#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE)
390# define _GLIBCXX_STD_C __cxx1998
391# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \
392	 namespace _GLIBCXX_STD_C {
393# define _GLIBCXX_END_NAMESPACE_CONTAINER }
394#else
395# define _GLIBCXX_STD_C std
396# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
397# define _GLIBCXX_END_NAMESPACE_CONTAINER
398#endif
399
400#ifdef _GLIBCXX_PARALLEL
401# define _GLIBCXX_STD_A __cxx1998
402# define _GLIBCXX_BEGIN_NAMESPACE_ALGO \
403	 namespace _GLIBCXX_STD_A {
404# define _GLIBCXX_END_NAMESPACE_ALGO }
405#else
406# define _GLIBCXX_STD_A std
407# define _GLIBCXX_BEGIN_NAMESPACE_ALGO
408# define _GLIBCXX_END_NAMESPACE_ALGO
409#endif
410
411// GLIBCXX_ABI Deprecated
412// Define if compatibility should be provided for -mlong-double-64.
413#undef _GLIBCXX_LONG_DOUBLE_COMPAT
414
415// Inline namespace for long double 128 mode.
416#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
417namespace std
418{
419  inline namespace __gnu_cxx_ldbl128 { }
420}
421# define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128::
422# define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 {
423# define _GLIBCXX_END_NAMESPACE_LDBL }
424#else
425# define _GLIBCXX_NAMESPACE_LDBL
426# define _GLIBCXX_BEGIN_NAMESPACE_LDBL
427# define _GLIBCXX_END_NAMESPACE_LDBL
428#endif
429#if _GLIBCXX_USE_CXX11_ABI
430# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_CXX11
431# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11
432# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_CXX11
433#else
434# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_LDBL
435# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_LDBL
436# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL
437#endif
438
439// Debug Mode implies checking assertions.
440#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS)
441# define _GLIBCXX_ASSERTIONS 1
442#endif
443
444// Disable std::string explicit instantiation declarations in order to assert.
445#ifdef _GLIBCXX_ASSERTIONS
446# undef _GLIBCXX_EXTERN_TEMPLATE
447# define _GLIBCXX_EXTERN_TEMPLATE -1
448#endif
449
450// Assert.
451#if defined(_GLIBCXX_ASSERTIONS) \
452  || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS)
453namespace std
454{
455  // Avoid the use of assert, because we're trying to keep the <cassert>
456  // include out of the mix.
457  extern "C++" inline void
458  __replacement_assert(const char* __file, int __line,
459		       const char* __function, const char* __condition)
460  {
461    __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
462		     __function, __condition);
463    __builtin_abort();
464  }
465}
466#define __glibcxx_assert_impl(_Condition)				 \
467  do 									 \
468  {							      		 \
469    if (! (_Condition))                                                  \
470      std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \
471				#_Condition);				 \
472  } while (false)
473#endif
474
475#if defined(_GLIBCXX_ASSERTIONS)
476# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition)
477#else
478# define __glibcxx_assert(_Condition)
479#endif
480
481// Macros for race detectors.
482// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and
483// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain
484// atomic (lock-free) synchronization to race detectors:
485// the race detector will infer a happens-before arc from the former to the
486// latter when they share the same argument pointer.
487//
488// The most frequent use case for these macros (and the only case in the
489// current implementation of the library) is atomic reference counting:
490//   void _M_remove_reference()
491//   {
492//     _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount);
493//     if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0)
494//       {
495//         _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount);
496//         _M_destroy(__a);
497//       }
498//   }
499// The annotations in this example tell the race detector that all memory
500// accesses occurred when the refcount was positive do not race with
501// memory accesses which occurred after the refcount became zero.
502#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE
503# define  _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A)
504#endif
505#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER
506# define  _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A)
507#endif
508
509// Macros for C linkage: define extern "C" linkage only when using C++.
510# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
511# define _GLIBCXX_END_EXTERN_C }
512
513#define _GLIBCXX_USE_ALLOCATOR_NEW
514
515#else // !__cplusplus
516# define _GLIBCXX_BEGIN_EXTERN_C
517# define _GLIBCXX_END_EXTERN_C
518#endif
519
520
521// First includes.
522
523// Pick up any OS-specific definitions.
524#include <bits/os_defines.h>
525
526// Pick up any CPU-specific definitions.
527#include <bits/cpu_defines.h>
528
529// If platform uses neither visibility nor psuedo-visibility,
530// specify empty default for namespace annotation macros.
531#ifndef _GLIBCXX_PSEUDO_VISIBILITY
532# define _GLIBCXX_PSEUDO_VISIBILITY(V)
533#endif
534
535// Certain function definitions that are meant to be overridable from
536// user code are decorated with this macro.  For some targets, this
537// macro causes these definitions to be weak.
538#ifndef _GLIBCXX_WEAK_DEFINITION
539# define _GLIBCXX_WEAK_DEFINITION
540#endif
541
542// By default, we assume that __GXX_WEAK__ also means that there is support
543// for declaring functions as weak while not defining such functions.  This
544// allows for referring to functions provided by other libraries (e.g.,
545// libitm) without depending on them if the respective features are not used.
546#ifndef _GLIBCXX_USE_WEAK_REF
547# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__
548#endif
549
550// Conditionally enable annotations for the Transactional Memory TS on C++11.
551// Most of the following conditions are due to limitations in the current
552// implementation.
553#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI			\
554  && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201500L	\
555  &&  !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF		\
556  && _GLIBCXX_USE_ALLOCATOR_NEW
557#define _GLIBCXX_TXN_SAFE transaction_safe
558#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic
559#else
560#define _GLIBCXX_TXN_SAFE
561#define _GLIBCXX_TXN_SAFE_DYN
562#endif
563
564#if __cplusplus > 201402L
565// In C++17 mathematical special functions are in namespace std.
566# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
567#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
568// For C++11 and C++14 they are in namespace std when requested.
569# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
570#endif
571
572// The remainder of the prewritten config is automatic; all the
573// user hooks are listed above.
574
575// Create a boolean flag to be used to determine if --fast-math is set.
576#ifdef __FAST_MATH__
577# define _GLIBCXX_FAST_MATH 1
578#else
579# define _GLIBCXX_FAST_MATH 0
580#endif
581
582// This marks string literals in header files to be extracted for eventual
583// translation.  It is primarily used for messages in thrown exceptions; see
584// src/functexcept.cc.  We use __N because the more traditional _N is used
585// for something else under certain OSes (see BADNAMES).
586#define __N(msgid)     (msgid)
587
588// For example, <windows.h> is known to #define min and max as macros...
589#undef min
590#undef max
591
592// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally
593// so they should be tested with #if not with #ifdef.
594#if __cplusplus >= 201103L
595# ifndef _GLIBCXX_USE_C99_MATH
596#  define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH
597# endif
598# ifndef _GLIBCXX_USE_C99_COMPLEX
599# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX
600# endif
601# ifndef _GLIBCXX_USE_C99_STDIO
602# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO
603# endif
604# ifndef _GLIBCXX_USE_C99_STDLIB
605# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB
606# endif
607# ifndef _GLIBCXX_USE_C99_WCHAR
608# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR
609# endif
610#else
611# ifndef _GLIBCXX_USE_C99_MATH
612#  define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH
613# endif
614# ifndef _GLIBCXX_USE_C99_COMPLEX
615# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX
616# endif
617# ifndef _GLIBCXX_USE_C99_STDIO
618# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO
619# endif
620# ifndef _GLIBCXX_USE_C99_STDLIB
621# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB
622# endif
623# ifndef _GLIBCXX_USE_C99_WCHAR
624# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR
625# endif
626#endif
627
628// Unless explicitly specified, enable char8_t extensions only if the core
629// language char8_t feature macro is defined.
630#ifndef _GLIBCXX_USE_CHAR8_T
631# ifdef __cpp_char8_t
632#  define _GLIBCXX_USE_CHAR8_T 1
633# endif
634#endif
635#ifdef _GLIBCXX_USE_CHAR8_T
636# define __cpp_lib_char8_t 201811L
637#endif
638
639/* Define if __float128 is supported on this host. */
640#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
641#define _GLIBCXX_USE_FLOAT128
642#endif
643
644#if __GNUC__ >= 7
645// Assume these are available if the compiler claims to be a recent GCC:
646# define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1
647# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1
648# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1
649# if __GNUC__ >= 9
650#  define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1
651# endif
652#elif defined(__is_identifier) && defined(__has_builtin)
653// For non-GNU compilers:
654# if ! __is_identifier(__has_unique_object_representations)
655#  define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1
656# endif
657# if ! __is_identifier(__is_aggregate)
658#  define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1
659# endif
660# if __has_builtin(__builtin_launder)
661#  define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1
662# endif
663# if __has_builtin(__builtin_is_constant_evaluated)
664#  define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1
665# endif
666#endif // GCC
667
668// PSTL configuration
669
670#if __cplusplus >= 201703L
671// This header is not installed for freestanding:
672#if __has_include(<pstl/pstl_config.h>)
673// Preserved here so we have some idea which version of upstream we've pulled in
674// #define PSTL_VERSION 104
675// #define PSTL_VERSION_MAJOR (PSTL_VERSION/100)
676// #define PSTL_VERSION_MINOR (PSTL_VERSION - PSTL_VERSION_MAJOR * 100)
677
678// For now this defaults to being based on the presence of Thread Building Blocks
679# ifndef _GLIBCXX_USE_TBB_PAR_BACKEND
680#  define _GLIBCXX_USE_TBB_PAR_BACKEND __has_include(<tbb/tbb.h>)
681# endif
682// This section will need some rework when a new (default) backend type is added
683# if _GLIBCXX_USE_TBB_PAR_BACKEND
684#  define __PSTL_USE_PAR_POLICIES 1
685# endif
686
687# define __PSTL_ASSERT(_Condition) __glibcxx_assert(_Condition)
688# define __PSTL_ASSERT_MSG(_Condition, _Message) __glibcxx_assert(_Condition)
689
690#include <pstl/pstl_config.h>
691#endif // __has_include
692#endif // C++17
693
694// End of prewritten config; the settings discovered at configure time follow.
695