@@ -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 \
@@ -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 \
@@ -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
@@ -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)
@@ -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
new file mode 100644
@@ -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
@@ -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
/**
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <algorithm>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <typeinfo>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <array>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <array>
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <deque>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <algorithm>
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <forward_list>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <functional>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <experimental/netfwd>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <atomic>
@@ -36,6 +36,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <iterator>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <list>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <map>
@@ -36,6 +36,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <memory>
@@ -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
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <experimental/executor>
@@ -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
@@ -36,6 +36,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <numeric>
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <type_traits>
@@ -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>
@@ -36,6 +36,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <ratio>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <regex>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 202002L
#include <concepts>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <set>
@@ -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
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <experimental/netfwd>
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <string>
@@ -36,6 +36,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <string>
@@ -36,6 +36,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <system_error>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <bits/chrono.h>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <tuple>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <unordered_map>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <unordered_set>
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // experimental is currently omitted
+
#if __cplusplus >= 201402L
#include <vector>
@@ -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)
@@ -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.
@@ -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
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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)
@@ -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>
@@ -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>
@@ -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>
@@ -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)
@@ -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>
@@ -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)
@@ -38,7 +38,10 @@
#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
@@ -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>
@@ -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
@@ -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
@@ -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)
@@ -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>
@@ -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>
@@ -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
}
@@ -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>
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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>
@@ -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
@@ -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)
@@ -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>
@@ -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
@@ -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>
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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>
@@ -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>
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h>
+
#if __cplusplus >= 201703L
/**
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // containers
+
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
@@ -35,6 +35,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // iostreams
+
#include <istream>
#include <ostream>
#include <bits/codecvt.h>
@@ -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
{
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
@@ -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>
@@ -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
@@ -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>
@@ -35,6 +35,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // iostreams
+
#include <bits/c++config.h>
#include <ostream>
#include <istream>
@@ -35,6 +35,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // iostreams
+
#include <ios>
#include <ostream>
@@ -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 */
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus > 201703L
#include <bits/atomic_base.h>
@@ -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>
@@ -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>
@@ -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>
@@ -63,10 +63,10 @@
#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
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // polymorphic allocation
+
#if __cplusplus >= 201703L
#include <bits/memory_resource.h>
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
@@ -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
@@ -35,6 +35,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // iostreams
+
#include <ios>
#include <bits/ostream_insert.h>
@@ -57,6 +57,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // containers
+
#include <deque>
#include <vector>
#include <bits/stl_heap.h>
@@ -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
@@ -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
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus > 201703L
#include <bits/semaphore_base.h>
@@ -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>
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus >= 201402L
#include <bits/chrono.h>
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // iostreams
+
#if __cplusplus > 202002L
#include <span>
#include <streambuf>
@@ -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
@@ -57,6 +57,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // containers
+
#include <deque>
#include <bits/stl_stack.h>
@@ -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
@@ -29,6 +29,8 @@
#ifndef _GLIBCXX_STOP_TOKEN
#define _GLIBCXX_STOP_TOKEN
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus > 201703L
#include <atomic>
@@ -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>
@@ -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>
@@ -38,6 +38,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // iostreams
+
#include <sstream>
#include <bits/alloc_traits.h>
@@ -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
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // concurrency
+
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // container
+
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // containers
+
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
@@ -33,6 +33,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // <cmath> dependant
+
#include <bits/c++config.h>
#include <cmath>
#include <algorithm>
@@ -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>
@@ -46,11 +46,11 @@
#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
@@ -73,35 +73,38 @@
#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
@@ -111,6 +114,7 @@
#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
@@ -120,17 +124,23 @@
# 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
@@ -146,9 +156,7 @@
#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
@@ -158,10 +166,6 @@
#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
@@ -176,18 +180,16 @@
# 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
@@ -202,6 +204,7 @@
#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
@@ -214,19 +217,32 @@
&& __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
@@ -234,9 +250,7 @@
# 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
@@ -268,11 +282,6 @@
# 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
@@ -283,28 +292,29 @@
#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
@@ -313,15 +323,7 @@
# 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
@@ -334,8 +336,6 @@
#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
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <bits/stl_algobase.h>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -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
@@ -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>
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <bits/c++config.h>
#if _GLIBCXX_HAVE_FENV_H
@@ -29,6 +29,8 @@
#ifndef _GLIBCXX_TR1_CFLOAT
#define _GLIBCXX_TR1_CFLOAT 1
+#include <bits/requires_hosted.h> // TR1
+
#include <cfloat>
#ifndef DECIMAL_DIG
@@ -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)
@@ -29,6 +29,8 @@
#ifndef _GLIBCXX_TR1_CLIMITS
#define _GLIBCXX_TR1_CLIMITS 1
+#include <bits/requires_hosted.h> // TR1
+
#include <climits>
#ifndef LLONG_MIN
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <cmath>
#ifdef _GLIBCXX_USE_C99_MATH_TR1
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <complex>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -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
@@ -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
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <bits/c++config.h>
#if _GLIBCXX_HAVE_STDBOOL_H
@@ -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)
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <cstdio>
#if _GLIBCXX_USE_C99_STDIO
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <cstdlib>
#if _GLIBCXX_HOSTED
@@ -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
@@ -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
@@ -29,6 +29,8 @@
#ifndef _TR1_CTYPE_H
#define _TR1_CTYPE_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cctype>
#endif
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <cwchar>
#ifdef _GLIBCXX_USE_WCHAR_T
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <cwctype>
#ifdef _GLIBCXX_USE_WCHAR_T
@@ -29,6 +29,8 @@
#ifndef _TR1_FENV_H
#define _TR1_FENV_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cfenv>
#endif
@@ -29,6 +29,8 @@
#ifndef _TR1_FLOAT_H
#define _TR1_FLOAT_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cfloat>
#endif
@@ -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>
@@ -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
@@ -29,6 +29,8 @@
#ifndef _TR1_LIMITS_H
#define _TR1_LIMITS_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/climits>
#endif
@@ -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
@@ -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
@@ -32,6 +32,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <cmath>
#include <cstdio>
#include <cstdlib>
@@ -33,6 +33,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <algorithm>
#include <bitset>
#include <iterator>
@@ -29,6 +29,8 @@
#ifndef _TR1_STDARG_H
#define _TR1_STDARG_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cstdarg>
#endif
@@ -29,6 +29,8 @@
#ifndef _TR1_STDBOOL_H
#define _TR1_STDBOOL_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cstdbool>
#endif
@@ -29,6 +29,8 @@
#ifndef _TR1_STDINT_H
#define _TR1_STDINT_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cstdint>
#endif
@@ -29,6 +29,8 @@
#ifndef _TR1_STDIO_H
#define _TR1_STDIO_H 1
+#include <bits/requires_hosted.h> // TR1
+
#include <tr1/cstdio>
#endif
@@ -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
@@ -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
@@ -34,6 +34,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <utility>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -31,6 +31,8 @@
#pragma GCC system_header
+#include <bits/requires_hosted.h> // TR1
+
#include <bits/c++config.h>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -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>
@@ -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>
@@ -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>
@@ -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
@@ -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
@@ -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