2 //===---------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===---------------------------------------------------------------------===//
10 #ifndef _LIBCPP___FWD_STRING_VIEW_H
11 #define _LIBCPP___FWD_STRING_VIEW_H
14 #include <__fwd/string.h>
16 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
17 # pragma GCC system_header
20 _LIBCPP_BEGIN_NAMESPACE_STD
22 template<class _CharT
, class _Traits
= char_traits
<_CharT
> >
23 class _LIBCPP_TEMPLATE_VIS basic_string_view
;
25 typedef basic_string_view
<char> string_view
;
26 #ifndef _LIBCPP_HAS_NO_CHAR8_T
27 typedef basic_string_view
<char8_t
> u8string_view
;
29 typedef basic_string_view
<char16_t
> u16string_view
;
30 typedef basic_string_view
<char32_t
> u32string_view
;
31 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
32 typedef basic_string_view
<wchar_t> wstring_view
;
36 template <class _CharT
, class _Traits
>
37 class _LIBCPP_PREFERRED_NAME(string_view
)
38 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
39 _LIBCPP_PREFERRED_NAME(wstring_view
)
41 #ifndef _LIBCPP_HAS_NO_CHAR8_T
42 _LIBCPP_PREFERRED_NAME(u8string_view
)
44 _LIBCPP_PREFERRED_NAME(u16string_view
)
45 _LIBCPP_PREFERRED_NAME(u32string_view
)
48 _LIBCPP_END_NAMESPACE_STD
50 #endif // _LIBCPP___FWD_STRING_VIEW_H