]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/experimental/filesystem/path/native/string.cc
PR libstdc++/78870 support std::filesystem on Windows
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / experimental / filesystem / path / native / string.cc
index bd353ae5e1988e3d93fef332a0ce2b3381f7faaf..8e40cdb0e1ef4645e2e80f6891925b1a51178d7c 100644 (file)
@@ -27,14 +27,15 @@ void
 test01()
 {
   using namespace std::experimental::filesystem;
-  const std::string s = "abc";
+  using string_type = std::basic_string<path::value_type>;
+  const string_type s{ 'a', 'b', 'c' };
   path p(s);
 
   VERIFY( p.native() == s );
   VERIFY( p.c_str() == s );
-  VERIFY( static_cast<std::string>(p) == s );
+  VERIFY( static_cast<string_type>(p) == s );
 
-  std::string s2 = p; // implicit conversion
+  string_type s2 = p; // implicit conversion
   VERIFY( s2 == p.native() );
 }