using string_view = basic_string_view<char>;
#ifdef _GLIBCXX_USE_WCHAR_T
using wstring_view = basic_string_view<wchar_t>;
+#endif
+#ifdef _GLIBCXX_USE_CHAR8_T
+ using u8string_view = basic_string_view<char8_t>;
#endif
using u16string_view = basic_string_view<char16_t>;
using u32string_view = basic_string_view<char32_t>;
{ };
#endif
+#ifdef _GLIBCXX_USE_CHAR8_T
+ template<>
+ struct hash<experimental::u8string_view>
+ : public __hash_base<size_t, experimental::u8string_view>
+ {
+ size_t
+ operator()(const experimental::u8string_view& __s) const noexcept
+ { return std::_Hash_impl::hash(__s.data(), __s.length()); }
+ };
+
+ template<>
+ struct __is_fast_hash<hash<experimental::u8string_view>> : std::false_type
+ { };
+#endif
+
template<>
struct hash<experimental::u16string_view>
: public __hash_base<size_t, experimental::u16string_view>
{ return basic_string_view<wchar_t>{__str, __len}; }
#endif
+#ifdef _GLIBCXX_USE_CHAR8_T
+ inline constexpr basic_string_view<char8_t>
+ operator""sv(const char8_t* __str, size_t __len) noexcept
+ { return basic_string_view<char8_t>{__str, __len}; }
+#endif
+
inline constexpr basic_string_view<char16_t>
operator""sv(const char16_t* __str, size_t __len) noexcept
{ return basic_string_view<char16_t>{__str, __len}; }