// { dg-options "-std=gnu++17" }
-// { dg-do compile }
+// { dg-do compile { target c++17 } }
-// Copyright (C) 2013-2017 Free Software Foundation, Inc.
+// Copyright (C) 2013-2021 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
#include <string_view>
#include <type_traits>
+#ifdef _GLIBCXX_USE_CHAR8_T
+using std::u8string_view;
+#else
+using u8string_view = std::string_view;
+#endif
+
void
test01()
{
static_assert(std::is_same<decltype("Hello"sv), std::string_view>::value,
"\"Hello\"s is std::string_view");
- static_assert(std::is_same<decltype(u8"Hello"sv), std::string_view>::value,
+ static_assert(std::is_same<decltype(u8"Hello"sv), u8string_view>::value,
"u8\"Hello\"s is std::string_view");
#ifdef _GLIBCXX_USE_WCHAR_T