]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/experimental/string_view/literals/types.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / experimental / string_view / literals / types.cc
index 7f71eb25334ed3c5df55a648ea7b920c2ede3281..540c6dfdf0dc9f84585efffee94be46a19155346 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile { target c++14 } }
 
-// Copyright (C) 2013-2018 Free Software Foundation, Inc.
+// Copyright (C) 2013-2020 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 <experimental/string_view>
 #include <type_traits>
 
+#ifdef _GLIBCXX_USE_CHAR8_T
+using std::experimental::u8string_view;
+#else
+using u8string_view = std::experimental::string_view;
+#endif
+
 void
 test01()
 {
@@ -28,7 +34,7 @@ test01()
   static_assert(std::is_same<decltype("Hello"sv), std::experimental::string_view>::value,
                "\"Hello\"s is std::string_view");
 
-  static_assert(std::is_same<decltype(u8"Hello"sv), std::experimental::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