]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Mark headers that must be hosted as such [PR103626]
authorArsen Arsenović <arsen@aarsen.me>
Mon, 19 Sep 2022 19:54:49 +0000 (21:54 +0200)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 3 Oct 2022 14:43:48 +0000 (15:43 +0100)
PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/103626
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/requires_hosted.h: New header.
* include/experimental/algorithm: Include
<bits/requires_hosted.h>.
* include/experimental/any: Likewise.
* include/experimental/array: Likewise.
* include/experimental/buffer: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/deque: Likewise.
* include/experimental/executor: Likewise.
* include/experimental/filesystem: Likewise.
* include/experimental/forward_list: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/internet: Likewise.
* include/experimental/io_context: Likewise.
* include/experimental/iterator: Likewise.
* include/experimental/list: Likewise.
* include/experimental/map: Likewise.
* include/experimental/memory: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/net: Likewise.
* include/experimental/netfwd: Likewise.
* include/experimental/numeric: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/regex: Likewise.
* include/experimental/scope: Likewise.
* include/experimental/set: Likewise.
* include/experimental/simd: Likewise.
* include/experimental/socket: Likewise.
* include/experimental/source_location: Likewise.
* include/experimental/string: Likewise.
* include/experimental/string_view: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/timer: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/unordered_map: Likewise.
* include/experimental/unordered_set: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/vector: Likewise.
* include/std/barrier: Likewise.
* include/std/chrono: Likewise.
* include/std/condition_variable: Likewise.
* include/std/deque: Likewise.
* include/std/execution: Likewise.
* include/std/filesystem: Likewise.
* include/std/forward_list: Likewise.
* include/std/fstream: Likewise.
* include/std/future: Likewise.
* include/std/iomanip: Likewise.
* include/std/ios: Likewise.
* include/std/iosfwd: Likewise.
* include/std/iostream: Likewise.
* include/std/istream: Likewise.
* include/std/latch: Likewise.
* include/std/list: Likewise.
* include/std/locale: Likewise.
* include/std/map: Likewise.
* include/std/memory_resource: Likewise.
* include/std/mutex: Likewise.
* include/std/ostream: Likewise.
* include/std/queue: Likewise.
* include/std/random: Likewise.
* include/std/regex: Likewise.
* include/std/semaphore: Likewise.
* include/std/set: Likewise.
* include/std/shared_mutex: Likewise.
* include/std/spanstream: Likewise.
* include/std/sstream: Likewise.
* include/std/stack: Likewise.
* include/std/stacktrace: Likewise.
* include/std/stop_token: Likewise.
* include/std/streambuf: Likewise.
* include/std/string: Likewise.
* include/std/syncstream: Likewise.
* include/std/system_error: Likewise.
* include/std/thread: Likewise.
* include/std/unordered_map: Likewise.
* include/std/unordered_set: Likewise.
* include/std/valarray: Likewise.
* include/std/vector: Likewise.
* include/tr1/array: Likewise.
* include/tr1/ccomplex: Likewise.
* include/tr1/cctype: Likewise.
* include/tr1/cfenv: Likewise.
* include/tr1/cfloat: Likewise.
* include/tr1/cinttypes: Likewise.
* include/tr1/climits: Likewise.
* include/tr1/cmath: Likewise.
* include/tr1/complex: Likewise.
* include/tr1/complex.h: Likewise.
* include/tr1/cstdarg: Likewise.
* include/tr1/cstdbool: Likewise.
* include/tr1/cstdint: Likewise.
* include/tr1/cstdio: Likewise.
* include/tr1/cstdlib: Likewise.
* include/tr1/ctgmath: Likewise.
* include/tr1/ctime: Likewise.
* include/tr1/ctype.h: Likewise.
* include/tr1/cwchar: Likewise.
* include/tr1/cwctype: Likewise.
* include/tr1/fenv.h: Likewise.
* include/tr1/float.h: Likewise.
* include/tr1/functional: Likewise.
* include/tr1/inttypes.h: Likewise.
* include/tr1/limits.h: Likewise.
* include/tr1/math.h: Likewise.
* include/tr1/memory: Likewise.
* include/tr1/random: Likewise.
* include/tr1/regex: Likewise.
* include/tr1/stdarg.h: Likewise.
* include/tr1/stdbool.h: Likewise.
* include/tr1/stdint.h: Likewise.
* include/tr1/stdio.h: Likewise.
* include/tr1/stdlib.h: Likewise.
* include/tr1/tgmath.h: Likewise.
* include/tr1/tuple: Likewise.
* include/tr1/type_traits: Likewise.
* include/tr1/unordered_map: Likewise.
* include/tr1/unordered_set: Likewise.
* include/tr1/utility: Likewise.
* include/tr1/wchar.h: Likewise.
* include/tr1/wctype.h: Likewise.
* include/c_global/cmath: Likewise.
* include/ext/algorithm: Include <bits/requires_hosted.h>.
* include/ext/bitmap_allocator.h: Likewise.
* include/ext/cmath: Likewise.
* include/ext/codecvt_specializations.h: Likewise.
* include/ext/debug_allocator.h: Likewise.
* include/ext/enc_filebuf.h: Likewise.
* include/ext/extptr_allocator.h: Likewise.
* include/ext/functional: Likewise.
* include/ext/malloc_allocator.h: Likewise.
* include/ext/memory: Likewise.
* include/ext/mt_allocator.h: Likewise.
* include/ext/new_allocator.h: Likewise.
* include/ext/numeric: Likewise.
* include/ext/pod_char_traits.h: Likewise.
* include/ext/pool_allocator.h: Likewise.
* include/ext/random: Likewise.
* include/ext/random.tcc: Likewise.
* include/ext/rb_tree: Likewise.
* include/ext/rc_string_base.h: Likewise.
* include/ext/rope: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/ext/slist: Likewise.
* include/ext/sso_string_base.h: Likewise.
* include/ext/stdio_filebuf.h: Likewise.
* include/ext/stdio_sync_filebuf.h: Likewise.
* include/ext/string_conversions.h: Likewise.
* include/ext/throw_allocator.h: Likewise.
* include/ext/vstring.h: Likewise.
* include/ext/vstring.tcc: Likewise.
* include/ext/vstring_fwd.h: Likewise.
* include/ext/vstring_util.h: Likewise.
* include/std/charconv: Likewise.
(__cpp_lib_to_chars): Do not define for freestanding.
* include/std/version: Adjust which macros get defined in
freestanding.
* include/ext/pointer.h [!_GLIBCXX_HOSTED]: Omit iostream
functionality from freestanding.
* include/std/algorithm [!_GLIBCXX_HOSTED]: Omit PSTL algos.
* include/std/memory [!_GLIBCXX_HOSTED]: Omit
<bits/stl_tempbuf.h> in freestanding
* include/bits/algorithmfwd.h [!_GLIBCXX_HOSTED]: Omit leftover
random_shuffle and stable_partition definition.
* include/bits/stl_algo.h [!_GLIBCXX_HOSTED]: Omit
random_shuffle and stable_partition from freestanding.
* include/bits/ranges_algo.h [!_GLIBCXX_HOSTED]: Omit
stable_partition from freestanding.
* include/bits/concept_check.h: Remove needless HOSTED check.
* include/std/iterator: Include <bits/ranges_base.h>.
* include/std/numeric (__cpp_lib_parallel_algorithms): Do not
define for freestanding.
* include/std/functional (__cpp_lib_boyer_moore_searcher):
Likewise.
* testsuite/lib/prune.exp: Match error for hosted-only libstdc++
tests.

170 files changed:
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/algorithmfwd.h
libstdc++-v3/include/bits/concept_check.h
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/include/bits/requires_hosted.h [new file with mode: 0644]
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/include/c_global/cmath
libstdc++-v3/include/experimental/algorithm
libstdc++-v3/include/experimental/any
libstdc++-v3/include/experimental/array
libstdc++-v3/include/experimental/buffer
libstdc++-v3/include/experimental/chrono
libstdc++-v3/include/experimental/deque
libstdc++-v3/include/experimental/executor
libstdc++-v3/include/experimental/filesystem
libstdc++-v3/include/experimental/forward_list
libstdc++-v3/include/experimental/functional
libstdc++-v3/include/experimental/internet
libstdc++-v3/include/experimental/io_context
libstdc++-v3/include/experimental/iterator
libstdc++-v3/include/experimental/list
libstdc++-v3/include/experimental/map
libstdc++-v3/include/experimental/memory
libstdc++-v3/include/experimental/memory_resource
libstdc++-v3/include/experimental/net
libstdc++-v3/include/experimental/netfwd
libstdc++-v3/include/experimental/numeric
libstdc++-v3/include/experimental/optional
libstdc++-v3/include/experimental/propagate_const
libstdc++-v3/include/experimental/random
libstdc++-v3/include/experimental/ratio
libstdc++-v3/include/experimental/regex
libstdc++-v3/include/experimental/scope
libstdc++-v3/include/experimental/set
libstdc++-v3/include/experimental/simd
libstdc++-v3/include/experimental/socket
libstdc++-v3/include/experimental/source_location
libstdc++-v3/include/experimental/string
libstdc++-v3/include/experimental/string_view
libstdc++-v3/include/experimental/system_error
libstdc++-v3/include/experimental/timer
libstdc++-v3/include/experimental/tuple
libstdc++-v3/include/experimental/unordered_map
libstdc++-v3/include/experimental/unordered_set
libstdc++-v3/include/experimental/utility
libstdc++-v3/include/experimental/vector
libstdc++-v3/include/ext/algorithm
libstdc++-v3/include/ext/bitmap_allocator.h
libstdc++-v3/include/ext/cmath
libstdc++-v3/include/ext/codecvt_specializations.h
libstdc++-v3/include/ext/debug_allocator.h
libstdc++-v3/include/ext/enc_filebuf.h
libstdc++-v3/include/ext/extptr_allocator.h
libstdc++-v3/include/ext/functional
libstdc++-v3/include/ext/malloc_allocator.h
libstdc++-v3/include/ext/memory
libstdc++-v3/include/ext/mt_allocator.h
libstdc++-v3/include/ext/new_allocator.h
libstdc++-v3/include/ext/numeric
libstdc++-v3/include/ext/pod_char_traits.h
libstdc++-v3/include/ext/pointer.h
libstdc++-v3/include/ext/pool_allocator.h
libstdc++-v3/include/ext/random
libstdc++-v3/include/ext/random.tcc
libstdc++-v3/include/ext/rb_tree
libstdc++-v3/include/ext/rc_string_base.h
libstdc++-v3/include/ext/rope
libstdc++-v3/include/ext/ropeimpl.h
libstdc++-v3/include/ext/slist
libstdc++-v3/include/ext/sso_string_base.h
libstdc++-v3/include/ext/stdio_filebuf.h
libstdc++-v3/include/ext/stdio_sync_filebuf.h
libstdc++-v3/include/ext/string_conversions.h
libstdc++-v3/include/ext/throw_allocator.h
libstdc++-v3/include/ext/vstring.h
libstdc++-v3/include/ext/vstring.tcc
libstdc++-v3/include/ext/vstring_fwd.h
libstdc++-v3/include/ext/vstring_util.h
libstdc++-v3/include/std/algorithm
libstdc++-v3/include/std/barrier
libstdc++-v3/include/std/charconv
libstdc++-v3/include/std/chrono
libstdc++-v3/include/std/condition_variable
libstdc++-v3/include/std/deque
libstdc++-v3/include/std/execution
libstdc++-v3/include/std/filesystem
libstdc++-v3/include/std/forward_list
libstdc++-v3/include/std/fstream
libstdc++-v3/include/std/functional
libstdc++-v3/include/std/future
libstdc++-v3/include/std/iomanip
libstdc++-v3/include/std/ios
libstdc++-v3/include/std/iosfwd
libstdc++-v3/include/std/iostream
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/iterator
libstdc++-v3/include/std/latch
libstdc++-v3/include/std/list
libstdc++-v3/include/std/locale
libstdc++-v3/include/std/map
libstdc++-v3/include/std/memory
libstdc++-v3/include/std/memory_resource
libstdc++-v3/include/std/mutex
libstdc++-v3/include/std/numeric
libstdc++-v3/include/std/ostream
libstdc++-v3/include/std/queue
libstdc++-v3/include/std/random
libstdc++-v3/include/std/regex
libstdc++-v3/include/std/semaphore
libstdc++-v3/include/std/set
libstdc++-v3/include/std/shared_mutex
libstdc++-v3/include/std/spanstream
libstdc++-v3/include/std/sstream
libstdc++-v3/include/std/stack
libstdc++-v3/include/std/stacktrace
libstdc++-v3/include/std/stop_token
libstdc++-v3/include/std/streambuf
libstdc++-v3/include/std/string
libstdc++-v3/include/std/syncstream
libstdc++-v3/include/std/system_error
libstdc++-v3/include/std/thread
libstdc++-v3/include/std/unordered_map
libstdc++-v3/include/std/unordered_set
libstdc++-v3/include/std/valarray
libstdc++-v3/include/std/vector
libstdc++-v3/include/std/version
libstdc++-v3/include/tr1/array
libstdc++-v3/include/tr1/ccomplex
libstdc++-v3/include/tr1/cctype
libstdc++-v3/include/tr1/cfenv
libstdc++-v3/include/tr1/cfloat
libstdc++-v3/include/tr1/cinttypes
libstdc++-v3/include/tr1/climits
libstdc++-v3/include/tr1/cmath
libstdc++-v3/include/tr1/complex
libstdc++-v3/include/tr1/complex.h
libstdc++-v3/include/tr1/cstdarg
libstdc++-v3/include/tr1/cstdbool
libstdc++-v3/include/tr1/cstdint
libstdc++-v3/include/tr1/cstdio
libstdc++-v3/include/tr1/cstdlib
libstdc++-v3/include/tr1/ctgmath
libstdc++-v3/include/tr1/ctime
libstdc++-v3/include/tr1/ctype.h
libstdc++-v3/include/tr1/cwchar
libstdc++-v3/include/tr1/cwctype
libstdc++-v3/include/tr1/fenv.h
libstdc++-v3/include/tr1/float.h
libstdc++-v3/include/tr1/functional
libstdc++-v3/include/tr1/inttypes.h
libstdc++-v3/include/tr1/limits.h
libstdc++-v3/include/tr1/math.h
libstdc++-v3/include/tr1/memory
libstdc++-v3/include/tr1/random
libstdc++-v3/include/tr1/regex
libstdc++-v3/include/tr1/stdarg.h
libstdc++-v3/include/tr1/stdbool.h
libstdc++-v3/include/tr1/stdint.h
libstdc++-v3/include/tr1/stdio.h
libstdc++-v3/include/tr1/stdlib.h
libstdc++-v3/include/tr1/tgmath.h
libstdc++-v3/include/tr1/tuple
libstdc++-v3/include/tr1/type_traits
libstdc++-v3/include/tr1/unordered_map
libstdc++-v3/include/tr1/unordered_set
libstdc++-v3/include/tr1/utility
libstdc++-v3/include/tr1/wchar.h
libstdc++-v3/include/tr1/wctype.h
libstdc++-v3/testsuite/lib/prune.exp

index 3472e84f75c5b999a3f2a04b937c2255c12505db..56227427b6d9240e417142b2683e700ae336bdc3 100644 (file)
@@ -193,6 +193,7 @@ bits_headers = \
        ${bits_srcdir}/regex_compiler.tcc \
        ${bits_srcdir}/regex_executor.h \
        ${bits_srcdir}/regex_executor.tcc \
+       ${bits_srcdir}/requires_hosted.h \
        ${bits_srcdir}/semaphore_base.h \
        ${bits_srcdir}/shared_ptr.h \
        ${bits_srcdir}/shared_ptr_atomic.h \
index 39ef34fc3cedf0ce67e7884f7f62eaf3c691f28e..f6ed98fefcdc51bc234b2291590a158291c6aa9e 100644 (file)
@@ -551,6 +551,7 @@ bits_headers = \
        ${bits_srcdir}/regex_compiler.tcc \
        ${bits_srcdir}/regex_executor.h \
        ${bits_srcdir}/regex_executor.tcc \
+       ${bits_srcdir}/requires_hosted.h \
        ${bits_srcdir}/semaphore_base.h \
        ${bits_srcdir}/shared_ptr.h \
        ${bits_srcdir}/shared_ptr_atomic.h \
index aacc34e09e871667b5f4a2274892856103ee9282..08330528e8eab614bb9b229d279f2c98166571a2 100644 (file)
@@ -638,9 +638,11 @@ _GLIBCXX_END_INLINE_ABI_NAMESPACE(_V2)
     void
     sort_heap(_RAIter, _RAIter, _Compare);
 
+#if _GLIBCXX_HOSTED
   template<typename _BIter, typename _Predicate>
     _BIter
     stable_partition(_BIter, _BIter, _Predicate);
+#endif
 
 #if __cplusplus < 201103L
   // For C++11 swap() is declared in <type_traits>.
@@ -828,6 +830,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
     _BIter
     partition(_BIter, _BIter, _Predicate);
 
+#if _GLIBCXX_HOSTED
   template<typename _RAIter>
     void
     random_shuffle(_RAIter, _RAIter);
@@ -840,6 +843,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
 #else
                   _Generator&);
 #endif
+#endif // HOSTED
 
   template<typename _FIter, typename _Tp>
     _GLIBCXX20_CONSTEXPR
index 35969d27280fd9815cc1643e1f426a05a4763eac..32b794d147edbddc0fad5ec726701b96b524b47b 100644 (file)
@@ -43,7 +43,7 @@
 // configure options or editing c++config.h.
 // It is not supported for freestanding implementations.
 
-#if !defined(_GLIBCXX_CONCEPT_CHECKS) || !_GLIBCXX_HOSTED
+#if !defined(_GLIBCXX_CONCEPT_CHECKS)
 
 #define __glibcxx_function_requires(...)
 #define __glibcxx_class_requires(_a,_b)
index 228e10b62bffedd530bfc57f29226f805574aa87..de71bd07a2fa1c93ba19c496ce0388732575a9f2 100644 (file)
@@ -2326,6 +2326,7 @@ namespace ranges
 
   inline constexpr __partition_fn partition{};
 
+#if _GLIBCXX_HOSTED
   struct __stable_partition_fn
   {
     template<bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent,
@@ -2356,6 +2357,7 @@ namespace ranges
   };
 
   inline constexpr __stable_partition_fn stable_partition{};
+#endif
 
   template<typename _Iter, typename _Out1, typename _Out2>
     struct in_out_out_result
diff --git a/libstdc++-v3/include/bits/requires_hosted.h b/libstdc++-v3/include/bits/requires_hosted.h
new file mode 100644 (file)
index 0000000..86916e2
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright The GNU Toolchain Authors.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/requires_hosted.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{version}
+ */
+
+#ifndef _REQUIRES_FREESTANDING_H
+#define _REQUIRES_FREESTANDING_H 1
+
+#include <bits/c++config.h>
+
+#if !_GLIBCXX_HOSTED
+#  error "This header is not available in freestanding mode."
+#endif
+
+#endif
index e63fe66852e33db669c74c8e7cee10fe3a9c7fe0..6386918fc8b35bfd5b2141062d7164cdf3df82ad 100644 (file)
@@ -4594,7 +4594,6 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
              std::iter_swap(__i, __j);
          }
     }
-#endif // HOSTED
 
   /**
    *  @brief Shuffle the elements of a sequence using a random number
@@ -4638,6 +4637,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
            std::iter_swap(__i, __j);
        }
     }
+#endif // HOSTED
 #endif // C++11 || USE_DEPRECATED
 
   /**
index 1b993f30330450add628905b243361d782156bf4..cc14982d3bb6eb77f98f8949a368a04cfa35cd2e 100644 (file)
@@ -38,6 +38,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h>
+
 #include <bits/c++config.h>
 #include <bits/cpp_type_traits.h>
 #include <ext/type_traits.h>
index 5a4a0221222c3ad7471fd6f7ac11e71eece44d04..99348cbb7990288f11fa9953271fa18b261fdbd5 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <algorithm>
index b8ff90ae2046cdb516bc2b4f0635ef2b7a5d3390..b8ab5a81236f0938cb4645ac779d9c6a1bda3d73 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <typeinfo>
index 3a064d2181fbd338cfb0493c02b2dcaaae60362d..f2bdd650f06b0211f0e93954750b8d1f3d5aac8e 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <array>
index 0c103e14891042d871bf5a18b9bf351d4c5c933b..bc346180d92768722fb3fb3dc2287e4bba5617c2 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <array>
index 8ec31910cd857e87394f43e87b9924a212f2829c..417f8be55625c3305176fca305ca347987cbf3fa 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <bits/chrono.h> // Only the C++14 parts of <chrono>
index b64deee19902890222d1cacb974c9f094312ba6d..4f3d12df832188212bf66a03d83e1a6cb93805b0 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <deque>
index bfcf2171f9b218748919210247f7ab266e99db11..9d0cd6edb947f166b639a97f7b3a4f43b36d74f0 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <algorithm>
index 85872e61693a34ddd54e71214bdb32f3dd71382b..7c47e6b79d1b96f02cf511ed7a3d5f78bff03365 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201103L
 
 #include <experimental/bits/fs_fwd.h>
index fedf2ba0c3b4eca438fc2827459055c46d393ab4..679b43d8c867284e253e4ec9ffdea2914856e179 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <forward_list>
index 1a47b522bf47e7b95f680ba94da5e76bc1913570..a0e73fa46b9f1713857654066b50bb72f092cc4e 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <functional>
index 4be4bfb731e584fdbdc8683d0dceb097394e7882..6e3c355f38e2d73afa992c9a7c7f9e5fe85e0872 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <experimental/netfwd>
index 8d4fc25f2cafa7a7d2b272f1c3e217995b77f10a..cea2a864e9c0412e0b8bdb931b643c2e398e88c0 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <atomic>
index e68d09cab339e3e802ecaceb4a37f53e1a92ee8a..35ac5a6044c373e94283614f725ef8a208a91a26 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <iterator>
index 7e4ef1891073848d39d45ffd2c33adb3d81fc96c..7d49eefe5ecebb15ff38e6338d789a970ed77a6f 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <list>
index 4936a66018978066541c2cc611a78a19d45e56b8..525252b83c1ca5d0dcb28bdc73b217f57befc283 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <map>
index 6cf11b4a14df2d1195531b36126202c7c8d3b8ca..fabeb5811618e4bc46f91e8623bdf4c5e384eef3 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <memory>
index d70a93219faabd181649d6c674665ac9a2b72096..aa86c042d843a58cfb4ad11f9c965d8989ccc2fa 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <memory>                      // align, uses_allocator, __uses_alloc
index 9d1d5c7a43042aabf762baa3d8f8d7bad700efb5..1268528d76ccb62e992afdbd667af756c34c4e30 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <experimental/executor>
index 2fd6ff9cf0e7efa973679198e55ef42f7e2943ae..e1e05336f1024e29d0b405106a3e5c108b4ae41e 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 // #define __cpp_lib_experimental_net 201803
index 426d9430dd6998ffb5a4edda49ed15af29ea6a58..26be27a7b72edb13f4d6bb60099a665f0d3f621a 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <numeric>
index 0d3a89404d179c0747f9ae469e9df8125fa71d62..c5da58aa938b7cfb9c608c21e839156b0a44bde4 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _GLIBCXX_EXPERIMENTAL_OPTIONAL
 #define _GLIBCXX_EXPERIMENTAL_OPTIONAL 1
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <type_traits>
index 80fcb2c060545ef4dbc5fd40ddc18d5656e98dd6..258ef6fdd446f455c90f8c6ebd5c26a8d5111668 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <type_traits>
index adef31fabd6e3cdd9673aa8fd8d0be587e5e3a3f..8728aa30f02cdc62d7ac3a7cb540b151bbb4a8f5 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _GLIBCXX_EXPERIMENTAL_RANDOM
 #define _GLIBCXX_EXPERIMENTAL_RANDOM 1
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 #include <random>
 #include <experimental/bits/lfts_config.h>
index 59ce85e7f30811f2ea5dcd9e6dc0a41eae50972c..5d873f2d673a734239314c97f9906f10491ca6a8 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <ratio>
index 9d063c6f5b4bb993413bd9ada6476c5a7646d87c..5efb88673474dc36b1711a3727ebcc2edb958992 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <regex>
index 208fadc513e4e381024ff664e2d0be675071ae08..5dbeac1479545dd5a5b1de003ca54cbd6cb0a548 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 202002L
 
 #include <concepts>
index aa43a2b2fc372a81033577aa3682266fc662b75d..b42a3cdcf1ad51d2c871baf4bb74bc1d74427134 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <set>
index f526c70c72896d1888171834763574547e46c044..4bd46481a25b3768807433a519454c15613428a5 100644 (file)
@@ -33,6 +33,8 @@
 #ifndef _GLIBCXX_EXPERIMENTAL_SIMD
 #define _GLIBCXX_EXPERIMENTAL_SIMD
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201703L
 
 /** @defgroup par-ts Parallelism TS
index 868927afeb570cdc02d0254afcf41def5954e099..65fe2b7535bfffdc7c83c0c0ba941c5043276c55 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <experimental/netfwd>
index afd3401117c5a4df69992d1ce28ac0e07c1fbc18..acd41c0c9de95b8820b2d8b47e9393394078536d 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _GLIBCXX_EXPERIMENTAL_SRCLOC
 #define _GLIBCXX_EXPERIMENTAL_SRCLOC 1
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 #include <cstdint>
 
index 01bd84b4df9ef6e738697f6004c118971d67b9ed..f326b85a0db5e417108299037846aa0aa3c341ef 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <string>
index ff04bb1fd0bb45a1711f0402cde1c9541429a254..f5b4cf10c440f3b6ab9716e714a2148d1223465a 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <string>
index 9023d4429ebda0e79a5b6cacf4dc2e9e67db8437..f41cddda8f437977f0847182ab2458d75a81e463 100644 (file)
@@ -36,6 +36,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <system_error>
index 745f3a465baf60f8668c69f80be42a5366fded2d..02498b0aed57eb0fb0c0da26d636633cac8cf635 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <bits/chrono.h>
index 338f2f5efb45118cab520061e49ee9b9362b2206..906bd7b1225e4605192eff06e07bbf9921b9dae3 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <tuple>
index 1a41687d5933894a2f80bb4d396d25e85253fbc2..ce56c2afb8c4f3748385040601c2870ad03d28f7 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <unordered_map>
index 583c43798a763263d3d79d334e7969f1cf838225..c7075874daf6f99c4fb201b47ce105986c40ea5c 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <unordered_set>
index 61567313cceb7b6fbf40b314ffff730007760142..cc335e02ccd3310452ac8b9ad32dd36a707378a3 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _GLIBCXX_EXPERIMENTAL_UTILITY
 #define _GLIBCXX_EXPERIMENTAL_UTILITY 1
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 #include <utility>
 #include <bits/uses_allocator.h>
index 2b611fc19371da6daabd6c739aa44f51388c61ad..4e8c8461e4471e5291ce3c4f46ffac4b52b0aee4 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
 #if __cplusplus >= 201402L
 
 #include <vector>
index f5eced66febacd70cb54844ecb4cf6543bfa4b58..65122dab5a3b22c4a51d996e9da4719340e194f4 100644 (file)
@@ -58,6 +58,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <algorithm>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index 033f132148a6e96e275e8ce2bf3694819e543153..80b8fa779bb566f339d2899e1a0f8332e8f3f084 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _BITMAP_ALLOCATOR_H
 #define _BITMAP_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <utility> // For std::pair.
 #include <bits/functexcept.h> // For __throw_bad_alloc().
 #include <bits/stl_function.h> // For greater_equal, and less_equal.
index 229196990031b55c7c04656ce01f281f45361577..2ebad8b0c85b69070d147a631179b82ce6285297 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 51b638d7f29650cf6314ceda1b708259ba70a5e0..7f733e67b0c4c6e8ca91a30ccec8edb3294b8755 100644 (file)
@@ -35,6 +35,8 @@
 #ifndef _EXT_CODECVT_SPECIALIZATIONS_H
 #define _EXT_CODECVT_SPECIALIZATIONS_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/c++config.h>
 #include <locale>
 #include <iconv.h>
index 3490dca8c5dc7a82a84e59ffe2797c24016cf190..06c15fb561cfc7bc603403ad74d6891fb3916684 100644 (file)
@@ -42,6 +42,8 @@
 #ifndef _DEBUG_ALLOCATOR_H
 #define _DEBUG_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <stdexcept>
 #include <bits/functexcept.h>
 #include <ext/alloc_traits.h>
index 12869a8b02df593ca98a9e77c426ecbe6c995bd8..fc3d9a88163ac13393bed97462369ddddf6c9b0f 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _EXT_ENC_FILEBUF_H
 #define _EXT_ENC_FILEBUF_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <fstream>
 #include <locale>
 #include <ext/codecvt_specializations.h>
index 20f746e73b6198842249af5eecd1faa3ec1ae38b..ad538c7716938dfc0a8e6cfe4715a741e1fff962 100644 (file)
@@ -36,6 +36,8 @@
 #ifndef _EXTPTR_ALLOCATOR_H
 #define _EXTPTR_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <memory>
 #include <ext/numeric_traits.h>
 #include <ext/pointer.h>
index 19cd8d5b56312f6078949b7773f0bf67bcba5be5..9cf864d929052236486d16f7f37f676707a454f2 100644 (file)
@@ -58,6 +58,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <functional>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index 82b3f0a1c6feecdccfbbe675686c729140d67320..6323ed9b60da15e241cbd1f09015c504d759ad43 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _MALLOC_ALLOCATOR_H
 #define _MALLOC_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // malloc
+
 #include <cstdlib>
 #include <cstddef>
 #include <new>
index 105952a351709092bf67bd5bbf2e69139bc1eb22..9e0082bd20a3200b2332e0b47ff1f64b40babd97 100644 (file)
@@ -58,6 +58,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <memory>
 #include <bits/stl_tempbuf.h>
 
index 393d6eb0ae7ec17b196fdd9ca0a368317e9cf28a..49743e46d0c41749cbc7390c0a027dbf1a641336 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _MT_ALLOCATOR_H
 #define _MT_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // getenv
+
 #include <new>
 #include <cstdlib>
 #include <bits/functexcept.h>
index 96e6523977a4f0d33637bfe155c22302c56dd1b9..db8895faf8ecfb9c98fb2758b408f39d4f333f2e 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _NEW_ALLOCATOR_H
 #define _NEW_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/new_allocator.h>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index 0b2c4ee0ba8aadb178986242e194f63e2303110a..1d9f4f4474794916db6a12fb17974cb38cc8e8fe 100644 (file)
@@ -58,6 +58,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/concept_check.h>
 #include <numeric>
 
index fa0f5b607f771567231ff18e5974de89b2622526..95d90f3e2dcadde72fa8d2b207ccf4cf0f2a9782 100644 (file)
@@ -34,6 +34,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <string>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index 04804f0287ac8df0fb34658cd50bef6c9d2e5944..48b768499fd8434fa39c14c5e452f1861f362ec0 100644 (file)
 
 #pragma GCC system_header
 
-#include <iosfwd>
+#if _GLIBCXX_HOSTED
+#  include <iosfwd>
+#endif
+
 #include <bits/stl_iterator_base_types.h>
 #include <ext/cast.h>
 #include <ext/type_traits.h>
@@ -559,11 +562,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                const _Pointer_adapter<_Tp>& __rhs)
     { return !(__lhs._Tp::operator<(__rhs)); }
 
+#if _GLIBCXX_HOSTED
   template<typename _CharT, typename _Traits, typename _StoreT>
     inline std::basic_ostream<_CharT, _Traits>&
     operator<<(std::basic_ostream<_CharT, _Traits>& __os, 
                const _Pointer_adapter<_StoreT>& __p)
     { return (__os << __p.get()); }
+#endif // HOSTED
 
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace
index 8d0f08979f026c7282d6ae2b078dd0ef2dcfbd11..f04a88c8d6c2b1a4e9cc3e7528a6c4f05b730b35 100644 (file)
@@ -42,6 +42,8 @@
 #ifndef _POOL_ALLOCATOR_H
 #define _POOL_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/c++config.h>
 #include <cstdlib>
 #include <new>
index 50505b876cc639e7cb267f4dd081df1f91ba1e8b..4cc0e25e02510ac53dcb44548f091af5d9e64b30 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 71ceea882784670dd10706e34bdbf06a03a80a18..7274e0d9f1ad859c633725c35fbd9c50bd94745e 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
index b61c45b220637e40c8974e2072f8a6a5541d0321..dd685fb27811b150910fc9f946a10c5ed5e7e35c 100644 (file)
@@ -58,6 +58,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/stl_tree.h>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index f196d884380aac4233c742f06648f52290f103c9..21ccfc21e57b2a512f929abd4799ad0dbfbd5d4a 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _RC_STRING_BASE_H
 #define _RC_STRING_BASE_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <ext/atomicity.h>
 #include <ext/alloc_traits.h>
 #include <bits/stl_iterator_base_funcs.h>
index f8af374f042d02d2f1dc2ef64f5c033f4f39a46f..a5a821ebf03a37bf3aea1fdecc95973c2855d31a 100644 (file)
@@ -45,6 +45,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <algorithm>
 #include <iosfwd>
 #include <bits/stl_construct.h>
index 27cb7389d74f0b476033f8e876804e9e34252e7b..fe35d9162c1d83350b2946ba6ea2e3b3fc98d1c6 100644 (file)
@@ -1227,6 +1227,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                __result = _S_concat(__forest[__i], __result);
                __forest[__i]->_M_unref_nonnil();
 #if !defined(__GC) && __cpp_exceptions
+
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
                __forest[__i] = 0;
 #endif
              }
index 7b6f8820d2aeaab15537c08eb6e07b2b3dca4d8b..f2b5109b065fd8918ee756e4d2d2e73223d3dbab 100644 (file)
@@ -44,6 +44,8 @@
 #ifndef _SLIST
 #define _SLIST 1
 
+#include <bits/requires_hosted.h> // std::allocator
+
 #include <algorithm>
 #include <bits/allocator.h>
 #include <bits/stl_construct.h>
index f2209e704bfda357b2eb7eae0ab6d44eb31e1a39..db5dc437898eae4e0bf1a0778537e3cb822f90fa 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _SSO_STRING_BASE_H
 #define _SSO_STRING_BASE_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
index 878839bf2aca176a1f68affb75818670982c6557..0e83e3542762fe5d2ea9c84f7c3510ba0952fb26 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <fstream>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index 49437c96976f9ace4ee1ac3ec1572c3950608ec8..8f51ae275b773f4e6d6dc6ad2ecddfb211ac355b 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <streambuf>
 #include <cstdio>
 #include <bits/c++io.h>  // For __c_file
index fc03974b5a0935f268d99e0e1355f1719e3a7291..a4648a9852f4acd08093c38d0fdbd08837361c22 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 220f5f5243f913081843dbc4fbed4ddcb95198d1..a1b57e7e6d98f755cc520e726e13f9a7e1adb3fc 100644 (file)
@@ -46,6 +46,8 @@
 #ifndef _THROW_ALLOCATOR_H
 #define _THROW_ALLOCATOR_H 1
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <cmath>
 #include <ctime>
 #include <map>
index 47cbabf24f12a97943cd2261d4c6448f47bed812..f0a12d64589606f9a8c13312ba6f40ff34becb00 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #if __cplusplus >= 201103L
 #include <initializer_list>
 #endif
index 0776fdcad1fb588b23a7d8f84a397002a8763005..18e4bbb283edbe1234dc8f50b1efcd432573d3bd 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/cxxabi_forced.h>
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
index c787e95efed10fd984bb8ddce5a16b7ebda6e26f..121492b0652b584749f1a6691c81bf5b47fb9068 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <bits/c++config.h>
 #include <bits/char_traits.h>
 #include <bits/allocator.h>
index 713c6976d75edfc6dea43946cf32148e17cf1b54..4e58a710894acbc42aee00a53a462907d02522b6 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
 #include <ext/vstring_fwd.h>
 #include <debug/debug.h>
 #include <bits/stl_function.h>  // For less
index e2cfd7ca662f849bf00c92bf229d628ad313d41b..4b39bfce134275ad0cc5969490a576eafe7c99b2 100644 (file)
@@ -63,7 +63,7 @@
 # include <bits/ranges_algo.h>
 #endif
 
-#if __cplusplus > 201402L
+#if __cplusplus > 201402L && _GLIBCXX_HOSTED
 // Parallel STL algorithms
 # if _PSTL_EXECUTION_POLICIES_DEFINED
 // If <execution> has already been included, pull in implementations
@@ -76,7 +76,7 @@
 
 // Feature test macro for parallel algorithms
 # define __cpp_lib_parallel_algorithm 201603L
-#endif // C++17
+#endif // C++17 && HOSTED
 
 #ifdef _GLIBCXX_PARALLEL
 # include <parallel/algorithm>
index 997e0a8f7ab3839c24535b75575c9594d1b2b62b..ab6dd8bd83d119bab0d509c710b78a60dfdabc5a 100644 (file)
@@ -40,6 +40,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // threading primitive
+
 #if __cplusplus > 201703L
 #include <bits/atomic_base.h>
 #if __cpp_lib_atomic_wait && __cpp_aligned_new
index 533320ea08521982eafc82511e75fc733a7265eb..64d0584a55d7939154d91eb85b77bd77e3465a49 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // for error codes
+
 // As an extension we support <charconv> in C++14, but this header should not
 // be included by any other library headers in C++14 mode. This ensures that
 // the names defined in this header are not added to namespace std unless a
@@ -44,7 +46,7 @@
 #include <ext/numeric_traits.h>
 
 #if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 \
-    && __SIZE_WIDTH__ >= 32
+    && __SIZE_WIDTH__ >= 32 && _GLIBCXX_HOSTED
 # define __cpp_lib_to_chars 201611L
 #endif
 
index 3732a40962acd292f00e4257e47e315b1eb336dc..c0c3a6796098688207cf5242cb789e6104880c1c 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // for <ctime> and clocks
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 06c4ff9ebddd558ac9f6322c5ada24728bd39b47..b885e1baa1b61090097fd2692789250597ab218f 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // threading primitive
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index abdc2e04cddaaf59710c98530a5f3e8e05c51ed4..0b692f165bc19c9df36e5de1018b583edbebe645 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers are hosted only
+
 #include <bits/stl_algobase.h>
 #include <bits/allocator.h>
 #include <bits/stl_construct.h>
index e933a1a36550dddf876cee14d0295ca8f98be939..17f62a278b94095d3798e019da314e50dfe5135e 100644 (file)
@@ -27,6 +27,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // execution policies are hosted only
+
 #if __cplusplus >= 201703L
 # include <bits/c++config.h>
 # include <pstl/glue_execution_defs.h>
index dd112a254ad3c47863cba7fb07e81c1176081bab..36d71dd38f5a04c7b96e10ff6697e3b0f741d8b5 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h>
+
 #if __cplusplus >= 201703L
 
 /**
index fe99e5ed5ef26d6948b888cf46186f85baa33e83..5d8052cb7588a25870e647c4b2f6001e734dddf3 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index e62a1ade3c20d5c18eb567df222b21546580a1c0..c43466451dddf87f234c45019fc9b7e13fea4714 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <istream>
 #include <ostream>
 #include <bits/codecvt.h>
index 5235ef203320697022c4656b8de1972efd2cd9b8..adf9cb1c546b708e4aecbf4adebb5182c4ecbddc 100644 (file)
@@ -1105,7 +1105,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 
   // Searchers
-#define __cpp_lib_boyer_moore_searcher 201603L
 
   template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
     class default_searcher
@@ -1138,6 +1137,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 
 #if _GLIBCXX_HOSTED
+#define __cpp_lib_boyer_moore_searcher 201603L
+
   template<typename _Key, typename _Tp, typename _Hash, typename _Pred>
     struct __boyer_moore_map_base
     {
index cf08c155a24bfab203ab5a0940cadd7992b6bdcf..8c968fef1ee499c6e9d993fb0af28841330bf5ce 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 537168139936af245b494d0ca9e89d34335b8435..f73519d2e0b6f7eb77f97090c0d36a0ebff14d1d 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <bits/c++config.h>
 #include <iosfwd>
 #include <bits/ios_base.h>
index 50a66cd9886e262d8ccfd89c15fb7d36f9951cce..c759986a4ae5b353996cbf0102ce559b5217c126 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <iosfwd>
 #include <exception>           // For ios_base::failure
 #include <bits/char_traits.h>  // For char_traits, streamoff, streamsize, fpos
index ddf0c953856c797ad3909de86306b0f52891e8fb..7f156f85c02d4e5aabb03f693357004d1c58248d 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <bits/c++config.h>
 #include <bits/stringfwd.h>    // For string forward declarations.
 #include <bits/postypes.h>
index d705913f53c61f12754ad745edd635e8d897dbd8..685d29a32f4fdc72d455a5665772f639160e4031 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <bits/c++config.h>
 #include <ostream>
 #include <istream>
index 416ef556fa1703a27103302249ddae79f0b30ed6..58716ce1d45bb2c7ba1ededcd95a5aa54d37377d 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <ios>
 #include <ostream>
 
index fb2a47c0dbb2f2ed1fa698c1a918baddb556f25c..8ee832725614b009614faf3c92e5e3e57bc32e61 100644 (file)
@@ -71,4 +71,8 @@
 # define __cpp_lib_null_iterators 201304L
 #endif
 
+#if __cplusplus >= 202002L
+#include <bits/ranges_base.h> // ranges::distance, ranges::next, ranges::prev
+#endif
+
 #endif /* _GLIBCXX_ITERATOR */
index 7ae90228d8fce12f269537ae2a2377c4a66ebc70..0442f095065b516c009db6e3f3918d443be53ba0 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus > 201703L
 
 #include <bits/atomic_base.h>
index 9151e98cb882701d3fc3406f4c46a413247b55c1..ec174edb97604f652493d9130fb863f0adda9ced 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #include <bits/stl_algobase.h>
 #include <bits/allocator.h>
 #include <bits/range_access.h>
index ae83586d6682b2fd6b51c621e774aaf2d4e67b15..abfed0529796f3e3e4d160f84649791032fc6e2c 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // locales
+
 #include <bits/localefwd.h>
 #include <bits/locale_classes.h>
 #include <bits/locale_facets.h>
index ce07f29ee0925871ed18761868c52e9e22f015ea..c973a8e6eca071c9c2df94b3bcd25d4460615f11 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #include <bits/stl_tree.h>
 #include <bits/stl_map.h>
 #include <bits/stl_multimap.h>
index 3eff12108f19bcc465e06402aa3a7c7ee9a389f7..4336724c9281dbe7e831dc679888a8730a93da6c 100644 (file)
 #include <bits/memoryfwd.h>
 #if _GLIBCXX_HOSTED
 # include <bits/allocator.h>
+# include <bits/stl_tempbuf.h>
 #endif
 #include <bits/stl_construct.h>
 #include <bits/stl_uninitialized.h>
-#include <bits/stl_tempbuf.h>
 #include <bits/stl_raw_storage_iter.h>
 
 #if __cplusplus >= 201103L
index 19c922516d5808ed9eb8f56da1f1ab116c1c27e7..323956eb7bfc1e93f1205dfd70c5b3c3c01d37a9 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // polymorphic allocation
+
 #if __cplusplus >= 201703L
 
 #include <bits/memory_resource.h>
index b9590bbf276c5a1f75faf4be66ec4e44038ae09a..b310c15687d323c1750f717e630fbe0666515139 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 60a99d18ffd5c1a38d0a3a6e9d148ec70bbe4751..0f1f26cd0c456f9bd1eb2fd6b2e7fd686a8a50e6 100644 (file)
@@ -729,7 +729,7 @@ namespace __detail
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace std
 
-#if __cplusplus >= 201703L
+#if __cplusplus >= 201703L && _GLIBCXX_HOSTED
 // Parallel STL algorithms
 # if _PSTL_EXECUTION_POLICIES_DEFINED
 // If <execution> has already been included, pull in implementations
index 291ea40b35521de664789d4557416daadb11dc53..674decf73cf02734f8d9b4c228907543cb74a2dc 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <ios>
 #include <bits/ostream_insert.h>
 
index db81ef1e6c7661104f12ed402db1d2c2424ad8b8..7c4952ff28123bd163352818b381df673032d964 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #include <deque>
 #include <vector>
 #include <bits/stl_heap.h>
index 89a2f16c9217b502ed24a31ca831c4938814d36c..66757f78be32c78ecbc13efce71b6d46b4f976a7 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // OS-dependent random
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 491bced23b5adc7179d331be3f89a24ad4ac032c..aa50c7e11657c753e20d029544af8243d260fc89 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // string and container heavy
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 8a31c6d1f702b1c709f5aa200c4b034070dc583c..72d68dd33a11673cdd0bb4d6e65880bf4aab9ded 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus > 201703L
 #include <bits/semaphore_base.h>
 
index 551c77727f1066b24582f5fedcd32567424910c9..4cbcba1dc2ffc0a1568c342b75e5b4934a7a7836 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #include <bits/stl_tree.h>
 #include <bits/stl_set.h>
 #include <bits/stl_multiset.h>
index 817a9587d87790aeca380a8961fb49d276948454..cf74b32f185196407adfc821c3c8872beff7dc3f 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus >= 201402L
 
 #include <bits/chrono.h>
index 5855b286efe377713b2990bdce930201e64711eb..6abf013d41bd36d2e2617f1b0249602e4c6c7b3a 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #if __cplusplus > 202002L
 #include <span>
 #include <streambuf>
index bc7d636e702ea4352a182cc521fd32a06ca31b6f..7305bdbecf4ef4cf82fed132d830de9e01e78da0 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostream
+
 #include <istream>
 #include <ostream>
 #include <bits/alloc_traits.h> // allocator_traits, __allocator_like
index fc14e2edc2e4cab900c600fab8ebb5ce30689f84..98d21236dc1200f808e0e4ccc05250691a170c63 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #include <deque>
 #include <bits/stl_stack.h>
 
index 39472d7236aa1c99c0a93296c35a4a28e271e315..e7cbbee563828145288a6b9b9e83ea97b637efd7 100644 (file)
@@ -26,6 +26,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // std::string bound
+
 #include <bits/c++config.h>
 
 #if __cplusplus > 202002L && _GLIBCXX_HAVE_STACKTRACE
index 07d4fdafeb4d980a59af8c12aaef117a0d2dff67..f1968343a1e43cc46261ed6b2e762d0e9cf0f237 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_STOP_TOKEN
 #define _GLIBCXX_STOP_TOKEN
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus > 201703L
 
 #include <atomic>
index 888611d12aaf7b7a54d7cab3b76d2dafd2612533..d8893df580f011a56e3a4b6de092edb90535e7e3 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <bits/c++config.h>
 #include <iosfwd>
 #include <bits/localefwd.h>
index 62ecdb3af45ab05a947bd3b79fcbc529bbf92a3e..41e6e2cb92b501e1150f5c0a6129acc4e420933b 100644 (file)
@@ -35,6 +35,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #include <bits/c++config.h>
 #include <bits/stringfwd.h>
 #include <bits/char_traits.h>
index 7a4f731ddd91047010b5ad9c3cf1b6cd43acb7b2..838cec591b74b4b349ba9c7c97461e7551bb1ff7 100644 (file)
@@ -38,6 +38,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // iostreams
+
 #include <sstream>
 
 #include <bits/alloc_traits.h>
index e12bb2f0e1e9996e1dfe34395a7f53d04c54d39a..6dad75d26bcd94355cbd35d6c7265be0ed4ca202 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // OS-dependent
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 82f191afe2d96d5c2c992cc53a88fc9cf8b6d0eb..a314b9eb9bf1dd367ae83445054d35edeaeca26b 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // concurrency
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index b50ec2a8de249961ddce17ddbf93c5e354b44bd1..323edcd722da4591136a262d7025adfccfc6d38d 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // container
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index edaa517635becb0049f393aba0c170b739190a85..998417f5d14f959c1aa4f30edbd1670cef8284f6 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // containers
+
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
index 87fec2b6df358c93cb1709befe899aaf6caaeca4..90bbed776967332e5d7522c58e726acc37b4b41e 100644 (file)
@@ -33,6 +33,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // <cmath> dependant
+
 #include <bits/c++config.h>
 #include <cmath>
 #include <algorithm>
index d7f69fd7a48bb7d7e51a01b2a6b9777c587792de..75377d5c7cca61e4a68854b31767668f3c476c95 100644 (file)
@@ -57,6 +57,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // container
+
 #include <bits/stl_algobase.h>
 #include <bits/allocator.h>
 #include <bits/stl_construct.h>
index 3fd5182d51d9dda740fe03c11732b650af08f556..397a4aa7b0ab37ce50b1d9359554090d52836a12 100644 (file)
 
 #if __cplusplus >= 201103L
 // c++11
+#define __cpp_lib_allocator_traits_is_always_equal 201411L
 #define __cpp_lib_is_null_pointer 201309L
 #define __cpp_lib_result_of_sfinae 201210L
 
 #if _GLIBCXX_HOSTED
-# define __cpp_lib_allocator_traits_is_always_equal 201411L
 #if __cplusplus <= 201703L // N.B. updated value in C++20
 # define __cpp_lib_shared_ptr_arrays 201611L
 #endif
 #if __cpp_impl_coroutine
 # define __cpp_lib_coroutine 201902L
 #endif
+#define __cpp_lib_exchange_function 201304L
+#define __cpp_lib_integer_sequence 201304L
 #define __cpp_lib_integral_constant_callable 201304L
 #define __cpp_lib_is_final 201402L
+#define __cpp_lib_make_reverse_iterator 201402L
+#ifndef _GLIBCXX_DEBUG // PR libstdc++/70303
+# define __cpp_lib_null_iterators 201304L
+#endif
 #define __cpp_lib_transformation_trait_aliases 201304L
+#define __cpp_lib_transparent_operators 201510L
+#define __cpp_lib_tuple_element_t 201402L
+#define __cpp_lib_tuples_by_type 201304L
 
 #if _GLIBCXX_HOSTED
 # define __cpp_lib_chrono_udls 201304L
 # define __cpp_lib_complex_udls 201309L
-# define __cpp_lib_exchange_function 201304L
 # define __cpp_lib_generic_associative_lookup 201304L
-# define __cpp_lib_integer_sequence 201304L
-# define __cpp_lib_make_reverse_iterator 201402L
 # define __cpp_lib_make_unique 201304L
-# ifndef _GLIBCXX_DEBUG // PR libstdc++/70303
-#  define __cpp_lib_null_iterators 201304L
-# endif
 # define __cpp_lib_quoted_string_io 201304L
 # define __cpp_lib_robust_nonmodifying_seq_ops 201304L
 # ifdef _GLIBCXX_HAS_GTHREADS
 #  define __cpp_lib_shared_timed_mutex 201402L
 # endif
 # define __cpp_lib_string_udls 201304L
-# define __cpp_lib_transparent_operators 201510L
-# define __cpp_lib_tuple_element_t 201402L
-# define __cpp_lib_tuples_by_type 201304L
 #endif
 
 #if __cplusplus >= 201703L
 // c++17
 #define __cpp_lib_addressof_constexpr 201603L
+#define __cpp_lib_any 201606L
+#define __cpp_lib_apply 201603L
+#define __cpp_lib_as_const 201510L
 #define __cpp_lib_atomic_is_always_lock_free 201603L
 #define __cpp_lib_bool_constant 201505L
 #define __cpp_lib_byte 201603L
 #ifdef __GCC_DESTRUCTIVE_SIZE
 # define __cpp_lib_hardware_interference_size 201703L
 #endif
+#define __cpp_lib_invoke 201411L
 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
 # define __cpp_lib_is_aggregate 201703L
 #endif
 # define __cpp_lib_launder 201606L
 #endif
 #define __cpp_lib_logical_traits 201510L
+#define __cpp_lib_make_from_tuple 201606L
+#define __cpp_lib_not_fn 201603L
+#if __cplusplus == 201703L // N.B. updated value in C++20
+# define __cpp_lib_optional 201606L
+#endif
 #define __cpp_lib_type_trait_variable_templates 201510L
 #define __cpp_lib_uncaught_exceptions 201411L
+#if !(__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L)
+// N.B. updated value in C++20
+# define __cpp_lib_variant 202102L
+#endif
 #define __cpp_lib_void_t 201411L
 
 #if _GLIBCXX_HOSTED
-#define __cpp_lib_any 201606L
-#define __cpp_lib_apply 201603L
 #if __cplusplus == 201703L // N.B. updated value in C++20
 # define __cpp_lib_array_constexpr 201803L
 #endif
-#define __cpp_lib_as_const 201510L
 #define __cpp_lib_boyer_moore_searcher 201603L
 #define __cpp_lib_chrono 201611L
 #define __cpp_lib_clamp 201603L
 #define __cpp_lib_gcd 201606L
 #define __cpp_lib_gcd_lcm 201606L
 #define __cpp_lib_hypot 201603L
-#define __cpp_lib_invoke 201411L
 #define __cpp_lib_lcm 201606L
-#define __cpp_lib_make_from_tuple 201606L
 #define __cpp_lib_map_try_emplace 201411L
 #define __cpp_lib_math_special_functions 201603L
 #ifdef _GLIBCXX_HAS_GTHREADS
 #endif
 #define __cpp_lib_node_extract 201606L
 #define __cpp_lib_nonmember_container_access 201411L
-#define __cpp_lib_not_fn 201603L
-#if __cplusplus == 201703L // N.B. updated value in C++20
-# define __cpp_lib_optional 201606L
-#endif
 #define __cpp_lib_parallel_algorithm 201603L
 #define __cpp_lib_raw_memory_algorithms 201606L
 #define __cpp_lib_sample 201603L
 # define __cpp_lib_to_chars 201611L
 #endif
 #define __cpp_lib_unordered_map_try_emplace 201411L
-#if !(__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L)
-// N.B. updated value in C++20
-# define __cpp_lib_variant 202102L
-#endif
 #endif
 
 #if __cplusplus >= 202002L
 // c++20
+#define __cpp_lib_assume_aligned 201811L
 #define __cpp_lib_atomic_flag_test 201907L
 #define __cpp_lib_atomic_float 201711L
 #define __cpp_lib_atomic_ref 201806L
 #define __cpp_lib_atomic_value_initialization 201911L
+#define __cpp_lib_bind_front 201907L
 #if __has_builtin(__builtin_bit_cast)
 # define __cpp_lib_bit_cast 201806L
 #endif
 #endif
 #define __cpp_lib_endian 201907L
 #define __cpp_lib_int_pow2 202002L
+#define __cpp_lib_integer_comparison_functions 202002L
 #ifdef _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
 # define __cpp_lib_is_constant_evaluated 201811L
 #endif
  && __has_builtin(__builtin_is_pointer_interconvertible_with_class)
 # define __cpp_lib_is_pointer_interconvertible 201907L
 #endif
+#define __cpp_lib_math_constants 201907L
+#if __cpp_lib_concepts
+# define __cpp_lib_make_obj_using_allocator 201811L
+#endif
+#define __cpp_lib_optional 202106L
 #define __cpp_lib_remove_cvref 201711L
 #if __has_builtin(__builtin_source_location)
 # define __cpp_lib_source_location 201907L
 #endif
+#if __cpp_lib_concepts
+# define __cpp_lib_span 202002L
+#endif
+#define __cpp_lib_ssize 201902L
 #if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
 # define __cpp_lib_three_way_comparison 201907L
 #endif
+#define __cpp_lib_to_address 201711L
+#define __cpp_lib_to_array 201907L
 #define __cpp_lib_type_identity 201806L
 #define __cpp_lib_unwrap_ref 201811L
+#if __cpp_concepts >= 202002L && __cpp_constexpr >= 201811L
+# define __cpp_lib_variant 202106L
+#endif
 
 #if _GLIBCXX_HOSTED
 #define __cpp_lib_array_constexpr 201811L
-#define __cpp_lib_assume_aligned 201811L
 #define __cpp_lib_atomic_shared_ptr 201711L
 #if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX
 # define __cpp_lib_atomic_wait 201907L
 #  define __cpp_lib_barrier 201907L
 # endif
 #endif
-#define __cpp_lib_bind_front 201907L
 // FIXME: #define __cpp_lib_execution 201902L
-#define __cpp_lib_integer_comparison_functions 202002L
 #define __cpp_lib_constexpr_algorithms 201806L
 #ifdef __cpp_lib_is_constant_evaluated
 # define __cpp_lib_constexpr_char_traits 201811L
 # define __cpp_lib_latch 201907L
 #endif
 #define __cpp_lib_list_remove_return_type 201806L
-#if __cpp_lib_concepts
-# define __cpp_lib_make_obj_using_allocator 201811L
-#endif
-#define __cpp_lib_math_constants 201907L
-#define __cpp_lib_optional 202106L
 #define __cpp_lib_polymorphic_allocator 201902L
 #if __cpp_lib_concepts
 # define __cpp_lib_ranges 202110L
 #define __cpp_lib_shared_ptr_arrays 201707L
 #define __cpp_lib_shift 201806L
 #define __cpp_lib_smart_ptr_for_overwrite 202002L
-#if __cpp_lib_concepts
-# define __cpp_lib_span 202002L
-#endif
-#define __cpp_lib_ssize 201902L
 #define __cpp_lib_starts_ends_with 201711L
 # if _GLIBCXX_USE_CXX11_ABI
 // Only supported with cxx11-abi
 #  define __cpp_lib_syncbuf 201803L
 # endif
-#define __cpp_lib_to_address 201711L
-#define __cpp_lib_to_array 201907L
-#if __cpp_concepts >= 202002L && __cpp_constexpr >= 201811L
-# define __cpp_lib_variant 202106L
-#endif
 #endif
 
 #if __cplusplus > 202002L
 // c++23
 #define __cpp_lib_byteswap 202110L
 #define __cpp_lib_constexpr_typeinfo 202106L
+#if __cpp_concepts >= 202002L
+# define __cpp_lib_expected 202202L
+#endif
+#define __cpp_lib_invoke_r 202106L
 #define __cpp_lib_is_scoped_enum 202011L
+#if __cpp_lib_concepts
+# undef __cpp_lib_optional
+# define __cpp_lib_optional 202110L
+#endif
 #define __cpp_lib_reference_from_temporary 202202L
+#define __cpp_lib_to_underlying 202102L
+#define __cpp_lib_unreachable 202202L
 
 #if _GLIBCXX_HOSTED
 #define __cpp_lib_adaptor_iterator_pair_constructor 202106L
 # undef __cpp_lib_constexpr_memory
 # define __cpp_lib_constexpr_memory 202202L
 #endif
-#if __cpp_concepts >= 202002L
-# define __cpp_lib_expected 202202L
-#endif
-#define __cpp_lib_invoke_r 202106L
 #define __cpp_lib_ios_noreplace 202207L
-#if __cpp_lib_concepts
-# undef __cpp_lib_optional
-# define __cpp_lib_optional 202110L
-#endif
 #define __cpp_lib_move_only_function 202110L
 #if __cpp_lib_span
 # define __cpp_lib_spanstream 202106L
 #if _GLIBCXX_USE_CXX11_ABI // Only supported with cxx11-abi
 # define __cpp_lib_string_resize_and_overwrite 202110L
 #endif
-#define __cpp_lib_to_underlying 202102L
-#define __cpp_lib_unreachable 202202L
 #endif
 #endif // C++23
 #endif // C++20
index 2aac0ed8106ade8502b2ba8a31b24d301eddc931..f03ad810f60e351cdf26aa62b5e6ac170776ed6a 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/stl_algobase.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)
index 8f9546e24dfa87e9249c22d53b26d8d018c09484..1b632be1aad14d96fa9954558c57b14c636892de 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CCOMPLEX
 #define _GLIBCXX_TR1_CCOMPLEX 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/complex>
 
 #endif // _GLIBCXX_TR1_CCOMPLEX
index 43520c7a2c1ce1881ee943505144ba39fa051ad3..2c4a15b4edc6c2c13e54d3414cfdb2bd1b33c222 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CCTYPE
 #define _GLIBCXX_TR1_CCTYPE 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/c++config.h>
 #include <cctype>
 
index 202fe27229c9e4e0d842185bb1f525130735f7dd..37e06c641b9895433cf86a58f6ed2d278138fc11 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/c++config.h>
 
 #if _GLIBCXX_HAVE_FENV_H
index 24565138b91bf1b1735aba4305be36093dd61ff6..76bfcfb4e6c1a998e6c952748bf84043798c8bd6 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CFLOAT
 #define _GLIBCXX_TR1_CFLOAT 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cfloat>
 
 #ifndef DECIMAL_DIG
index a04cf24720f3101d5bbbdf081b143b8755417322..24b464827719af75fd3ebc5c37082ea5d46f7887 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cstdint>
 
 // For 8.11.1/1 (see C99, Note 184)
index 95e3bc3b4da61973f60d75d8e141f14c3e4f31ca..0d702dcdaec97e386a1db6a60321328623c9edf5 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CLIMITS
 #define _GLIBCXX_TR1_CLIMITS 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <climits>
 
 #ifndef LLONG_MIN
index f3a53f3c5b2372a8e8b1bfe14da86630f148612e..384f116952452d2a427859f4af29c47e980017b3 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cmath>
 
 #ifdef _GLIBCXX_USE_C99_MATH_TR1
index abb5e13fe23759e375ab80b99fb510d385584b5d..fa88cd5017cd7c2dc71eef43c4630d81fc4bfacb 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <complex>
 
 namespace std _GLIBCXX_VISIBILITY(default)
index f2824784f60d3f3b68c7ef8af335878b6c540e70..c5fb4c103d76ebfc59af03823b3cd76dea466e52 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_COMPLEX_H
 #define _GLIBCXX_TR1_COMPLEX_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/ccomplex>
 
 #endif // _GLIBCXX_TR1_COMPLEX_H
index f28ff2a602dc08669c22d28705d6a5f6992a36f3..f046e8162518745742df8a137dc4fd293b527188 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CSTDARG
 #define _GLIBCXX_TR1_CSTDARG 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cstdarg>
 
 #endif // _GLIBCXX_TR1_CSTDARG
index 77c0315624897ab587742516371b274e0b9d24b2..20afb63be52746601c11ab35e841999419a41062 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/c++config.h>
 
 #if _GLIBCXX_HAVE_STDBOOL_H
index 0d13b30daa4f90077a6b502b650e59966b07d9b1..9e3e45c76aac0218350d857be815e9d4252514d0 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/c++config.h>
 
 // For 8.22.1/1 (see C99, Notes 219, 220, 222)
index 4692d213d4d80af75fb637f099527c3861efaff9..dcbff6a0eb4873ba8de1056567a339f1def2325c 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cstdio>
 
 #if _GLIBCXX_USE_C99_STDIO
index de952bb1619c698ab04a4196928a2cc9a7f9acd9..5569b0dca658c860f84ffe87c45af5bcc351e076 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cstdlib>
 
 #if _GLIBCXX_HOSTED
index 64ef40544e7091f2e5b065ea8f1e150a26c789d3..15ada9c9255edf3091b5602a0f77c94fd4376e9a 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CTGMATH
 #define _GLIBCXX_TR1_CTGMATH 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cmath>
 
 #endif // _GLIBCXX_TR1_CTGMATH
index 8b9b8699b73f474a223d8930a77e551ccb4e524e..99b529a0f506298e667572155cf7c70441d7175b 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_CTIME
 #define _GLIBCXX_TR1_CTIME 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <ctime>
 
 #endif // _GLIBCXX_TR1_CTIME
index 91177ff7d7c0d229c655cf05414749466a55ff8b..014fc2b0a5305101c43adcf74a587d2ff40ec9a2 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_CTYPE_H
 #define _TR1_CTYPE_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cctype>
 
 #endif
index 23219bc2d6b174b67dc32e0677093b32158c3d8e..1140edaa965ffa3b04af1da686ea81702584dd28 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cwchar>
 
 #ifdef _GLIBCXX_USE_WCHAR_T
index 1a71dd05d26ff4bfa4214e7ed2aff508d1b64a5a..ddb25af4cfc257b9bc3ea3ea6b77d31633564385 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cwctype>
 
 #ifdef _GLIBCXX_USE_WCHAR_T
index 091b0b8a83df6e34d8b91be1883620aa41658ba9..2547f003fdbd161a55197129e3d2c77b037a3687 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_FENV_H
 #define _TR1_FENV_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cfenv>
 
 #endif
index 23670789d680ebca524662caa009fbc4aad10c86..1dd3ef13f408aef4027597bec00e7dda44325ed7 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_FLOAT_H
 #define _TR1_FLOAT_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cfloat>
 
 #endif
index 83d22bed9e5a6fb9ba6ff7fdd34b7fea0b65ecce..ae219ab9678e3101a6eebee72aa23320d51194c3 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <functional> // for std::_Placeholder, std::_Bind, std::_Bind_result
 
 #include <typeinfo>
index 22a75144bb8f437dfea5760e83e01448a23c40c8..eb5ddbe5123923bb93df8898d1f0dfd743398c41 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_INTTYPES_H
 #define _GLIBCXX_TR1_INTTYPES_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cinttypes>
 
 #endif // _GLIBCXX_TR1_INTTYPES_H
index b54f9d2ed0f007b9f59add92d805003420236fc7..73baf85cc94512a3e67c58489eeac1bdaeb4e017 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_LIMITS_H
 #define _TR1_LIMITS_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/climits>
 
 #endif
index 423b5ea0ad7ad0a3ef79d1d1edab6ac456b06eb8..99c8f45b5232bce60af4f5cacca2d4f6209563d5 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_MATH_H
 #define _GLIBCXX_TR1_MATH_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cmath>
 
 #if _GLIBCXX_USE_C99_MATH_TR1
index b50a5588a4055a00c83fd845af50d7c707a2fad6..759000b2b93be6a273f620ac004bd7c66d2607ed 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #if defined(_GLIBCXX_INCLUDE_AS_CXX11)
 #  error TR1 header cannot be included from C++11 header
 #endif
index cb5754082e2394c6ad6d7fb6c6774697e018b44c..f9fbd4d625a14ae47a56db2451c53bd31bccb2c5 100644 (file)
@@ -32,6 +32,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <cmath>
 #include <cstdio>
 #include <cstdlib>
index 10db3725723a013363959357a3691490d3017c19..bcdea9d7881ff24222c8464262ad94193f3f5112 100644 (file)
@@ -33,6 +33,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <algorithm>
 #include <bitset>
 #include <iterator>
index 446dda16b1a16ae75bb7a94629b81136886ba3e6..4622f3338beb8f581ac31ce40c0dac39c2ec51bf 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_STDARG_H
 #define _TR1_STDARG_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cstdarg>
 
 #endif
index 76d0b729e796baaf4ce6cdd663db78d15f1797c7..368e891dd3c453c7804d00b8bc13525b3a53f9cc 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_STDBOOL_H
 #define _TR1_STDBOOL_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cstdbool>
 
 #endif
index 59c1d958fdbf9e3d4a8d4347d9bca084f63fcdb6..b19361b30535ebbcebd867c7656a1543c2142483 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_STDINT_H
 #define _TR1_STDINT_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cstdint>
 
 #endif
index f7cc5c7ebe79c2f3a2b36a1f89a16b73b325cf64..3ef65f9044bf8d3d553bf01b1165dbedb8d05e5c 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _TR1_STDIO_H
 #define _TR1_STDIO_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cstdio>
 
 #endif
index 0e9c605cce808dee0ba4cf88fe26c5007e1f9c65..0963136ba3d925fa35d7d933376680ffb35deae1 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_STDLIB_H
 #define _GLIBCXX_TR1_STDLIB_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cstdlib>
 
 #if _GLIBCXX_HOSTED
index 3871c3c93e5608ff1f4cdb0ac8cc2aa0ef7cb851..a3505c9b0997ec8b3f95cd16df346dd97752a749 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_TGMATH_H
 #define _GLIBCXX_TR1_TGMATH_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/ctgmath>
 
 #endif // _GLIBCXX_TR1_TGMATH_H
index 94b1c0de532b66998cdf925174a64d6f387eb40b..a24da25df73ddb448aea20399bf3be05e04f8cae 100644 (file)
@@ -34,6 +34,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <utility>
 
 namespace std _GLIBCXX_VISIBILITY(default)
index 2ee3b06e450639ffbfff12dffded619c7d6d7926..305a0d03de2f07a1f7fc41dcf851607ef3436111 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/c++config.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)
index edec4e2d379d1e3cc46260fb3757a43a01aa9cf2..24d38920021d527d0c86658cf594cf4e61d597d5 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <utility>
 #include <bits/stl_algobase.h>
 #include <bits/allocator.h>
index fa11b167847eac00dc32d3a6818d7665a8d61130..59f0ab927342f469e03528328ffd0a013626868a 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <utility>
 #include <bits/stl_algobase.h>
 #include <bits/allocator.h>
index e6e3bbd42fa54a98c06876e914617feb80432c5c..cc2699d8a912046a9e194ca99d141ba4c2668629 100644 (file)
@@ -31,6 +31,8 @@
 
 #pragma GCC system_header
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <bits/c++config.h>
 #include <bits/stl_relops.h>
 #include <bits/stl_pair.h>
index 503ca203961c1298805664495a37de873c4d56a7..0812c07ef11b9f2f6362c39b700bb947352231c8 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_WCHAR_H
 #define _GLIBCXX_TR1_WCHAR_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cwchar>
 
 #endif // _GLIBCXX_TR1_WCHAR_H
index fa0e4581a7cfb953dcbfd6a59378b5cd3e12a173..84fd7cc5045dba4266e37681108b497e78246e8f 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _GLIBCXX_TR1_WCTYPE_H
 #define _GLIBCXX_TR1_WCTYPE_H 1
 
+#include <bits/requires_hosted.h> // TR1
+
 #include <tr1/cwctype>
 
 #endif // _GLIBCXX_TR1_WCTYPE_H
index 70ff302288ed4fc04755168ee2f3fa332186dd8d..d457e9752180eb900e74b25ea87039007be51080 100644 (file)
@@ -33,6 +33,10 @@ proc libstdc++-dg-prune { system text } {
 
 #    send_user "Before:$text\n"
 
+    if { [string match "*This header is not available in freestanding mode.*" $text] } {
+      return "::unsupported::hosted C++ headers not supported"
+    }
+
     # Ignore caret diagnostics. Unfortunately dejaGNU trims leading
     # spaces, so one cannot rely on them being present.
     regsub -all "(^|\n)\[^\n\]+\n *\\^\n" $text "\n" text