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 21 template <class _CharT> 22 struct _LIBCPP_TEMPLATE_VIS char_traits; 23 template <> 24 struct char_traits<char>; 25 26 #ifndef _LIBCPP_HAS_NO_CHAR8_T 27 template <> 28 struct char_traits<char8_t>; 29 #endif 30 31 template <> 32 struct char_traits<char16_t>; 33 template <> 34 struct char_traits<char32_t>; 35 36 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS 37 template <> 38 struct char_traits<wchar_t>; 39 #endif 40 41 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> > 42 class _LIBCPP_TEMPLATE_VIS basic_string; 43 44 using string = basic_string<char>; 45 46 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS 47 using wstring = basic_string<wchar_t>; 48 #endif 49 50 #ifndef _LIBCPP_HAS_NO_CHAR8_T 51 using u8string = basic_string<char8_t>; 52 #endif 53 54 using u16string = basic_string<char16_t>; 55 using u32string = basic_string<char32_t>; 56 57 // clang-format off 58 template <class _CharT, class _Traits, class _Allocator> 59 class _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