Warning: This file is not a C or C++ file. It does not have highlighting.

1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _LIBCPP___CXX03___FWD_STRING_H
10#define _LIBCPP___CXX03___FWD_STRING_H
11
12#include <__cxx03/__config>
13#include <__cxx03/__fwd/memory.h>
14
15#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16# pragma GCC system_header
17#endif
18
19_LIBCPP_BEGIN_NAMESPACE_STD
20
21template <class _CharT>
22struct _LIBCPP_TEMPLATE_VIS char_traits;
23template <>
24struct char_traits<char>;
25
26#ifndef _LIBCPP_HAS_NO_CHAR8_T
27template <>
28struct char_traits<char8_t>;
29#endif
30
31template <>
32struct char_traits<char16_t>;
33template <>
34struct char_traits<char32_t>;
35
36#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
37template <>
38struct char_traits<wchar_t>;
39#endif
40
41template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
42class _LIBCPP_TEMPLATE_VIS basic_string;
43
44using string = basic_string<char>;
45
46#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
47using wstring = basic_string<wchar_t>;
48#endif
49
50#ifndef _LIBCPP_HAS_NO_CHAR8_T
51using u8string = basic_string<char8_t>;
52#endif
53
54using u16string = basic_string<char16_t>;
55using u32string = basic_string<char32_t>;
56
57// clang-format off
58template <class _CharT, class _Traits, class _Allocator>
59class _LIBCPP_PREFERRED_NAME(string)
60#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
61 _LIBCPP_PREFERRED_NAME(wstring)
62#endif
63#ifndef _LIBCPP_HAS_NO_CHAR8_T
64 _LIBCPP_PREFERRED_NAME(u8string)
65#endif
66 _LIBCPP_PREFERRED_NAME(u16string)
67 _LIBCPP_PREFERRED_NAME(u32string)
68 basic_string;
69// clang-format on
70
71_LIBCPP_END_NAMESPACE_STD
72
73#endif // _LIBCPP___CXX03___FWD_STRING_H
74

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of libcxx/include/__cxx03/__fwd/string.h