From 3ad39e9878310e5317ee73c9b353c1e2c1c5c4ee Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sat, 11 Jul 2026 22:48:30 +0800 Subject: lib: establish Zircon libc++ and KTL foundation --- third_party/libcxx/include/c++/v1/__fwd/array.h | 47 +++++++++ .../libcxx/include/c++/v1/__fwd/bit_reference.h | 44 +++++++++ third_party/libcxx/include/c++/v1/__fwd/byte.h | 26 +++++ third_party/libcxx/include/c++/v1/__fwd/complex.h | 42 ++++++++ third_party/libcxx/include/c++/v1/__fwd/deque.h | 26 +++++ third_party/libcxx/include/c++/v1/__fwd/format.h | 55 +++++++++++ third_party/libcxx/include/c++/v1/__fwd/fstream.h | 53 ++++++++++ .../libcxx/include/c++/v1/__fwd/functional.h | 35 +++++++ third_party/libcxx/include/c++/v1/__fwd/get.h | 24 +++++ third_party/libcxx/include/c++/v1/__fwd/ios.h | 43 +++++++++ third_party/libcxx/include/c++/v1/__fwd/istream.h | 43 +++++++++ third_party/libcxx/include/c++/v1/__fwd/mdspan.h | 57 +++++++++++ third_party/libcxx/include/c++/v1/__fwd/memory.h | 28 ++++++ .../libcxx/include/c++/v1/__fwd/memory_resource.h | 31 ++++++ third_party/libcxx/include/c++/v1/__fwd/ostream.h | 35 +++++++ third_party/libcxx/include/c++/v1/__fwd/pair.h | 51 ++++++++++ third_party/libcxx/include/c++/v1/__fwd/queue.h | 31 ++++++ third_party/libcxx/include/c++/v1/__fwd/span.h | 38 ++++++++ third_party/libcxx/include/c++/v1/__fwd/sstream.h | 58 +++++++++++ third_party/libcxx/include/c++/v1/__fwd/stack.h | 26 +++++ .../libcxx/include/c++/v1/__fwd/streambuf.h | 35 +++++++ third_party/libcxx/include/c++/v1/__fwd/string.h | 107 +++++++++++++++++++++ .../libcxx/include/c++/v1/__fwd/string_view.h | 50 ++++++++++ third_party/libcxx/include/c++/v1/__fwd/subrange.h | 49 ++++++++++ third_party/libcxx/include/c++/v1/__fwd/tuple.h | 66 +++++++++++++ third_party/libcxx/include/c++/v1/__fwd/variant.h | 68 +++++++++++++ third_party/libcxx/include/c++/v1/__fwd/vector.h | 29 ++++++ 27 files changed, 1197 insertions(+) create mode 100644 third_party/libcxx/include/c++/v1/__fwd/array.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/bit_reference.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/byte.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/complex.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/deque.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/format.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/fstream.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/functional.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/get.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/ios.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/istream.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/mdspan.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/memory.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/memory_resource.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/ostream.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/pair.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/queue.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/span.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/sstream.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/stack.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/streambuf.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/string.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/string_view.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/subrange.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/tuple.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/variant.h create mode 100644 third_party/libcxx/include/c++/v1/__fwd/vector.h (limited to 'third_party/libcxx/include/c++/v1/__fwd') diff --git a/third_party/libcxx/include/c++/v1/__fwd/array.h b/third_party/libcxx/include/c++/v1/__fwd/array.h new file mode 100644 index 0000000..476de88 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/array.h @@ -0,0 +1,47 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_ARRAY_H +#define _LIBCPP___FWD_ARRAY_H + +#include <__config> +#include <__cstddef/size_t.h> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct array; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT; + +#ifndef _LIBCPP_CXX03_LANG +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp&& get(array<_Tp, _Size>&&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&& get(const array<_Tp, _Size>&&) _NOEXCEPT; +#endif + +template +inline const bool __is_std_array_v = false; + +template +inline const bool __is_std_array_v > = true; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_ARRAY_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/bit_reference.h b/third_party/libcxx/include/c++/v1/__fwd/bit_reference.h new file mode 100644 index 0000000..36058d5 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/bit_reference.h @@ -0,0 +1,44 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_BIT_REFERENCE_H +#define _LIBCPP___FWD_BIT_REFERENCE_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +class __bit_iterator; + +template +struct __bit_array; + +template +struct __size_difference_type_traits; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void +__fill_masked_range(_StoragePointer __word, unsigned __clz, unsigned __ctz, bool __fill_val); + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __trailing_mask(unsigned __clz); + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __leading_mask(unsigned __ctz); + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __middle_mask(unsigned __clz, unsigned __ctz); + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_BIT_REFERENCE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/byte.h b/third_party/libcxx/include/c++/v1/__fwd/byte.h new file mode 100644 index 0000000..6f2d6ae --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/byte.h @@ -0,0 +1,26 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_BYTE_H +#define _LIBCPP___FWD_BYTE_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +#if _LIBCPP_STD_VER >= 17 +_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD + +enum class byte : unsigned char; + +_LIBCPP_END_UNVERSIONED_NAMESPACE_STD +#endif // _LIBCPP_STD_VER >= 17 + +#endif // _LIBCPP___FWD_BYTE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/complex.h b/third_party/libcxx/include/c++/v1/__fwd/complex.h new file mode 100644 index 0000000..ff3c5c1 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/complex.h @@ -0,0 +1,42 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_COMPLEX_H +#define _LIBCPP___FWD_COMPLEX_H + +#include <__config> +#include <__cstddef/size_t.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +class complex; + +#if _LIBCPP_STD_VER >= 26 + +template +_LIBCPP_HIDE_FROM_ABI constexpr _Tp& get(complex<_Tp>&) noexcept; + +template +_LIBCPP_HIDE_FROM_ABI constexpr _Tp&& get(complex<_Tp>&&) noexcept; + +template +_LIBCPP_HIDE_FROM_ABI constexpr const _Tp& get(const complex<_Tp>&) noexcept; + +template +_LIBCPP_HIDE_FROM_ABI constexpr const _Tp&& get(const complex<_Tp>&&) noexcept; + +#endif // _LIBCPP_STD_VER >= 26 + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_COMPLEX_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/deque.h b/third_party/libcxx/include/c++/v1/__fwd/deque.h new file mode 100644 index 0000000..35877a7 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/deque.h @@ -0,0 +1,26 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_DEQUE_H +#define _LIBCPP___FWD_DEQUE_H + +#include <__config> +#include <__fwd/memory.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class deque; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_DEQUE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/format.h b/third_party/libcxx/include/c++/v1/__fwd/format.h new file mode 100644 index 0000000..e9d1536 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/format.h @@ -0,0 +1,55 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_FORMAT_H +#define _LIBCPP___FWD_FORMAT_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 20 + +template +class basic_format_arg; + +template +class basic_format_context; + +template +struct formatter; + +# if _LIBCPP_STD_VER >= 23 + +_LIBCPP_DIAGNOSTIC_PUSH +_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wshadow") +_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wshadow") +// This shadows map, set, and string. +enum class range_format { disabled, map, set, sequence, string, debug_string }; +_LIBCPP_DIAGNOSTIC_POP + +template +constexpr range_format format_kind = [] { + // [format.range.fmtkind]/1 + // A program that instantiates the primary template of format_kind is ill-formed. + static_assert(sizeof(_Rp) != sizeof(_Rp), "create a template specialization of format_kind for your type"); + return range_format::disabled; +}(); + +# endif // _LIBCPP_STD_VER >= 23 + +#endif // _LIBCPP_STD_VER >= 20 + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_FORMAT_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/fstream.h b/third_party/libcxx/include/c++/v1/__fwd/fstream.h new file mode 100644 index 0000000..34a14df --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/fstream.h @@ -0,0 +1,53 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_FSTREAM_H +#define _LIBCPP___FWD_FSTREAM_H + +#include <__config> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class basic_filebuf; +template > +class basic_ifstream; +template > +class basic_ofstream; +template > +class basic_fstream; + +using filebuf = basic_filebuf; +using ifstream = basic_ifstream; +using ofstream = basic_ofstream; +using fstream = basic_fstream; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wfilebuf = basic_filebuf; +using wifstream = basic_ifstream; +using wofstream = basic_ofstream; +using wfstream = basic_fstream; +#endif + +template +class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfilebuf)) basic_filebuf; +template +class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wifstream)) basic_ifstream; +template +class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wofstream)) basic_ofstream; +template +class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfstream)) basic_fstream; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_FSTREAM_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/functional.h b/third_party/libcxx/include/c++/v1/__fwd/functional.h new file mode 100644 index 0000000..a8c6024 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/functional.h @@ -0,0 +1,35 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_FUNCTIONAL_H +#define _LIBCPP___FWD_FUNCTIONAL_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 14 +template +#else +template +#endif +struct less; + +template +struct hash; + +template +class reference_wrapper; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_FUNCTIONAL_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/get.h b/third_party/libcxx/include/c++/v1/__fwd/get.h new file mode 100644 index 0000000..6121ed0 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/get.h @@ -0,0 +1,24 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_GET_H +#define _LIBCPP___FWD_GET_H + +#include <__config> +#include <__fwd/array.h> +#include <__fwd/complex.h> +#include <__fwd/pair.h> +#include <__fwd/subrange.h> +#include <__fwd/tuple.h> +#include <__fwd/variant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +#endif // _LIBCPP___FWD_GET_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/ios.h b/third_party/libcxx/include/c++/v1/__fwd/ios.h new file mode 100644 index 0000000..fd6738a --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/ios.h @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_IOS_H +#define _LIBCPP___FWD_IOS_H + +#include <__config> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +class _LIBCPP_EXPORTED_FROM_ABI ios_base; + +template > +class basic_ios; + +using ios = basic_ios; +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wios = basic_ios; +#endif + +template +class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wios)) basic_ios; + +#if _LIBCPP_LIBC_NEWLIB +// On newlib, off_t is 'long int' +using streamoff = long int; // for char_traits in +#else +using streamoff = long long; // for char_traits in +#endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_IOS_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/istream.h b/third_party/libcxx/include/c++/v1/__fwd/istream.h new file mode 100644 index 0000000..91c21c1 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/istream.h @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_ISTREAM_H +#define _LIBCPP___FWD_ISTREAM_H + +#include <__config> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class basic_istream; + +template > +class basic_iostream; + +using istream = basic_istream; +using iostream = basic_iostream; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wistream = basic_istream; +using wiostream = basic_iostream; +#endif + +template +class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistream)) basic_istream; + +template +class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wiostream)) basic_iostream; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_ISTREAM_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/mdspan.h b/third_party/libcxx/include/c++/v1/__fwd/mdspan.h new file mode 100644 index 0000000..8889567 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/mdspan.h @@ -0,0 +1,57 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Kokkos v. 4.0 +// Copyright (2022) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, +// the U.S. Government retains certain rights in this software. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___MDSPAN_LAYOUTS_H +#define _LIBCPP___MDSPAN_LAYOUTS_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 23 + +// Layout policy with a mapping which corresponds to FORTRAN-style array layouts +struct layout_left { + template + class mapping; +}; + +// Layout policy with a mapping which corresponds to C-style array layouts +struct layout_right { + template + class mapping; +}; + +// Layout policy with a unique mapping where strides are arbitrary +struct layout_stride { + template + class mapping; +}; + +#endif // _LIBCPP_STD_VER >= 23 + +_LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS + +#endif // _LIBCPP___MDSPAN_LAYOUTS_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/memory.h b/third_party/libcxx/include/c++/v1/__fwd/memory.h new file mode 100644 index 0000000..09ab5d8 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/memory.h @@ -0,0 +1,28 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_MEMORY_H +#define _LIBCPP___FWD_MEMORY_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +class allocator; + +template +class shared_ptr; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_MEMORY_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/memory_resource.h b/third_party/libcxx/include/c++/v1/__fwd/memory_resource.h new file mode 100644 index 0000000..dc5a7cc --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/memory_resource.h @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_MEMORY_RESOURCE_H +#define _LIBCPP___FWD_MEMORY_RESOURCE_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +#if _LIBCPP_STD_VER >= 17 + +_LIBCPP_BEGIN_NAMESPACE_STD + +namespace pmr { +template +class _LIBCPP_AVAILABILITY_PMR polymorphic_allocator; +} // namespace pmr + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP_STD_VER >= 17 + +#endif // _LIBCPP___FWD_MEMORY_RESOURCE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/ostream.h b/third_party/libcxx/include/c++/v1/__fwd/ostream.h new file mode 100644 index 0000000..9ceb02d --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/ostream.h @@ -0,0 +1,35 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_OSTREAM_H +#define _LIBCPP___FWD_OSTREAM_H + +#include <__config> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class basic_ostream; + +using ostream = basic_ostream; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wostream = basic_ostream; +#endif + +template +class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostream)) basic_ostream; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_OSTREAM_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/pair.h b/third_party/libcxx/include/c++/v1/__fwd/pair.h new file mode 100644 index 0000000..cf07eab --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/pair.h @@ -0,0 +1,51 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_PAIR_H +#define _LIBCPP___FWD_PAIR_H + +#include <__config> +#include <__cstddef/size_t.h> +#include <__fwd/tuple.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct pair; + +template +inline const bool __is_pair_v = false; + +template +inline const bool __is_pair_v > = true; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type& +get(pair<_T1, _T2>&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type& +get(const pair<_T1, _T2>&) _NOEXCEPT; + +#ifndef _LIBCPP_CXX03_LANG +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&& +get(pair<_T1, _T2>&&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&& +get(const pair<_T1, _T2>&&) _NOEXCEPT; +#endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_PAIR_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/queue.h b/third_party/libcxx/include/c++/v1/__fwd/queue.h new file mode 100644 index 0000000..d32730d --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/queue.h @@ -0,0 +1,31 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_QUEUE_H +#define _LIBCPP___FWD_QUEUE_H + +#include <__config> +#include <__functional/operations.h> +#include <__fwd/deque.h> +#include <__fwd/vector.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class queue; + +template , class _Compare = less > +class priority_queue; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_QUEUE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/span.h b/third_party/libcxx/include/c++/v1/__fwd/span.h new file mode 100644 index 0000000..5d473ee --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/span.h @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_SPAN_H +#define _LIBCPP___FWD_SPAN_H + +#include <__config> +#include <__cstddef/size_t.h> +#include + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 20 + +inline constexpr size_t dynamic_extent = numeric_limits::max(); +template +class span; + +#endif + +_LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS + +#endif // _LIBCPP___FWD_SPAN_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/sstream.h b/third_party/libcxx/include/c++/v1/__fwd/sstream.h new file mode 100644 index 0000000..fe637d8 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/sstream.h @@ -0,0 +1,58 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_SSTREAM_H +#define _LIBCPP___FWD_SSTREAM_H + +#include <__config> +#include <__fwd/memory.h> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template , class _Allocator = allocator<_CharT> > +class basic_stringbuf; + +template , class _Allocator = allocator<_CharT> > +class basic_istringstream; +template , class _Allocator = allocator<_CharT> > +class basic_ostringstream; +template , class _Allocator = allocator<_CharT> > +class basic_stringstream; + +using stringbuf = basic_stringbuf; +using istringstream = basic_istringstream; +using ostringstream = basic_ostringstream; +using stringstream = basic_stringstream; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wstringbuf = basic_stringbuf; +using wistringstream = basic_istringstream; +using wostringstream = basic_ostringstream; +using wstringstream = basic_stringstream; +#endif + +template +class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringbuf)) basic_stringbuf; +template +class _LIBCPP_PREFERRED_NAME(istringstream) + _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistringstream)) basic_istringstream; +template +class _LIBCPP_PREFERRED_NAME(ostringstream) + _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostringstream)) basic_ostringstream; +template +class _LIBCPP_PREFERRED_NAME(stringstream) + _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringstream)) basic_stringstream; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_SSTREAM_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/stack.h b/third_party/libcxx/include/c++/v1/__fwd/stack.h new file mode 100644 index 0000000..922f03e --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/stack.h @@ -0,0 +1,26 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_STACK_H +#define _LIBCPP___FWD_STACK_H + +#include <__config> +#include <__fwd/deque.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class stack; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_STACK_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/streambuf.h b/third_party/libcxx/include/c++/v1/__fwd/streambuf.h new file mode 100644 index 0000000..d3d9d46 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/streambuf.h @@ -0,0 +1,35 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_STREAMBUF_H +#define _LIBCPP___FWD_STREAMBUF_H + +#include <__config> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class basic_streambuf; + +using streambuf = basic_streambuf; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wstreambuf = basic_streambuf; +#endif + +template +class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstreambuf)) basic_streambuf; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_STREAMBUF_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/string.h b/third_party/libcxx/include/c++/v1/__fwd/string.h new file mode 100644 index 0000000..254d0c8 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/string.h @@ -0,0 +1,107 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_STRING_H +#define _LIBCPP___FWD_STRING_H + +#include <__config> +#include <__fwd/memory.h> +#include <__fwd/memory_resource.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct char_traits; +template <> +struct char_traits; + +#if _LIBCPP_HAS_CHAR8_T +template <> +struct char_traits; +#endif + +template <> +struct char_traits; +template <> +struct char_traits; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +template <> +struct char_traits; +#endif + +template , class _Allocator = allocator<_CharT> > +class basic_string; + +using string = basic_string; + +#if _LIBCPP_HAS_WIDE_CHARACTERS +using wstring = basic_string; +#endif + +#if _LIBCPP_HAS_CHAR8_T +using u8string = basic_string; +#endif + +using u16string = basic_string; +using u32string = basic_string; + +#if _LIBCPP_STD_VER >= 17 + +namespace pmr { +template > +using basic_string _LIBCPP_AVAILABILITY_PMR = std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; + +using string _LIBCPP_AVAILABILITY_PMR = basic_string; + +# if _LIBCPP_HAS_WIDE_CHARACTERS +using wstring _LIBCPP_AVAILABILITY_PMR = basic_string; +# endif + +# if _LIBCPP_HAS_CHAR8_T +using u8string _LIBCPP_AVAILABILITY_PMR = basic_string; +# endif + +using u16string _LIBCPP_AVAILABILITY_PMR = basic_string; +using u32string _LIBCPP_AVAILABILITY_PMR = basic_string; +} // namespace pmr + +#endif // _LIBCPP_STD_VER >= 17 + +// clang-format off +template +class _LIBCPP_PREFERRED_NAME(string) +#if _LIBCPP_HAS_WIDE_CHARACTERS + _LIBCPP_PREFERRED_NAME(wstring) +#endif +#if _LIBCPP_HAS_CHAR8_T + _LIBCPP_PREFERRED_NAME(u8string) +#endif + _LIBCPP_PREFERRED_NAME(u16string) + _LIBCPP_PREFERRED_NAME(u32string) +#if _LIBCPP_STD_VER >= 17 + _LIBCPP_PREFERRED_NAME(pmr::string) +# if _LIBCPP_HAS_WIDE_CHARACTERS + _LIBCPP_PREFERRED_NAME(pmr::wstring) +# endif +# if _LIBCPP_HAS_CHAR8_T + _LIBCPP_PREFERRED_NAME(pmr::u8string) +# endif + _LIBCPP_PREFERRED_NAME(pmr::u16string) + _LIBCPP_PREFERRED_NAME(pmr::u32string) +#endif + basic_string; +// clang-format on + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_STRING_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/string_view.h b/third_party/libcxx/include/c++/v1/__fwd/string_view.h new file mode 100644 index 0000000..8da963d --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/string_view.h @@ -0,0 +1,50 @@ +// -*- C++ -*- +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_STRING_VIEW_H +#define _LIBCPP___FWD_STRING_VIEW_H + +#include <__config> +#include <__fwd/string.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class basic_string_view; + +typedef basic_string_view string_view; +#if _LIBCPP_HAS_CHAR8_T +typedef basic_string_view u8string_view; +#endif +typedef basic_string_view u16string_view; +typedef basic_string_view u32string_view; +#if _LIBCPP_HAS_WIDE_CHARACTERS +typedef basic_string_view wstring_view; +#endif + +// clang-format off +template +class _LIBCPP_PREFERRED_NAME(string_view) +#if _LIBCPP_HAS_WIDE_CHARACTERS + _LIBCPP_PREFERRED_NAME(wstring_view) +#endif +#if _LIBCPP_HAS_CHAR8_T + _LIBCPP_PREFERRED_NAME(u8string_view) +#endif + _LIBCPP_PREFERRED_NAME(u16string_view) + _LIBCPP_PREFERRED_NAME(u32string_view) + basic_string_view; +// clang-format on +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_STRING_VIEW_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/subrange.h b/third_party/libcxx/include/c++/v1/__fwd/subrange.h new file mode 100644 index 0000000..81db94a --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/subrange.h @@ -0,0 +1,49 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_SUBRANGE_H +#define _LIBCPP___FWD_SUBRANGE_H + +#include <__concepts/copyable.h> +#include <__config> +#include <__cstddef/size_t.h> +#include <__iterator/concepts.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +#if _LIBCPP_STD_VER >= 20 + +_LIBCPP_BEGIN_NAMESPACE_STD + +namespace ranges { + +enum class subrange_kind : bool { unsized, sized }; + +template _Sent, subrange_kind _Kind> + requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>) +class subrange; + +template + requires((_Index == 0 && copyable<_Iter>) || _Index == 1) +_LIBCPP_HIDE_FROM_ABI constexpr auto get(const subrange<_Iter, _Sent, _Kind>&); + +template + requires(_Index < 2) +_LIBCPP_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&&); + +} // namespace ranges + +using ranges::get; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP_STD_VER >= 20 + +#endif // _LIBCPP___FWD_SUBRANGE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/tuple.h b/third_party/libcxx/include/c++/v1/__fwd/tuple.h new file mode 100644 index 0000000..dc96c03 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/tuple.h @@ -0,0 +1,66 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_TUPLE_H +#define _LIBCPP___FWD_TUPLE_H + +#include <__config> +#include <__cstddef/size_t.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct tuple_element; + +template +using __tuple_element_t _LIBCPP_NODEBUG = typename tuple_element<_Np, _Tp>::type; + +#ifndef _LIBCPP_CXX03_LANG + +template +class tuple; + +template +inline const bool __is_tuple_v = false; + +template +inline const bool __is_tuple_v> = true; + +template +struct tuple_element<_Ip, tuple<_Tp...> > { + using type _LIBCPP_NODEBUG = __type_pack_element<_Ip, _Tp...>; +}; + +template +struct tuple_size; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type& +get(tuple<_Tp...>&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type& +get(const tuple<_Tp...>&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&& +get(tuple<_Tp...>&&) _NOEXCEPT; + +template +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&& +get(const tuple<_Tp...>&&) _NOEXCEPT; + +#endif // _LIBCPP_CXX03_LANG + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_TUPLE_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/variant.h b/third_party/libcxx/include/c++/v1/__fwd/variant.h new file mode 100644 index 0000000..fef7071 --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/variant.h @@ -0,0 +1,68 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_VARIANT_H +#define _LIBCPP___FWD_VARIANT_H + +#include <__config> +#include <__cstddef/size_t.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 17 + +template +class variant; + +template +struct variant_size; + +template +inline constexpr size_t variant_size_v = variant_size<_Tp>::value; + +template +struct variant_alternative; + +template +using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type; + +inline constexpr size_t variant_npos = static_cast(-1); + +template +_LIBCPP_HIDE_FROM_ABI constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(variant<_Types...>&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(variant<_Types...>&&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(const variant<_Types...>&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(const variant<_Types...>&&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr _Tp& get(variant<_Types...>&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr _Tp&& get(variant<_Types...>&&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr const _Tp& get(const variant<_Types...>&); + +template +_LIBCPP_HIDE_FROM_ABI constexpr const _Tp&& get(const variant<_Types...>&&); + +#endif // _LIBCPP_STD_VER >= 17 + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_VARIANT_H diff --git a/third_party/libcxx/include/c++/v1/__fwd/vector.h b/third_party/libcxx/include/c++/v1/__fwd/vector.h new file mode 100644 index 0000000..31084ec --- /dev/null +++ b/third_party/libcxx/include/c++/v1/__fwd/vector.h @@ -0,0 +1,29 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCPP___FWD_VECTOR_H +#define _LIBCPP___FWD_VECTOR_H + +#include <__config> +#include <__fwd/memory.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template > +class vector; + +template +class vector; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___FWD_VECTOR_H -- cgit v1.2.3