Ver Fonte

Update calls to std::fstream constructors (#3880)

Constructing types like `std::ifstream` with `std::string_view` is no
longer allowed; one must pass a different type, such as `std::string`. A
recent libc++ change requires this:
https://github.com/llvm/llvm-project/commit/4761e74a276ee1f38596f4849daa9d633929f2ae
Jordan Rupprecht há 2 anos atrás
pai
commit
ad3961570e
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      testing/file_test/file_test_base.cpp

+ 1 - 1
testing/file_test/file_test_base.cpp

@@ -49,7 +49,7 @@ using ::testing::StrEq;
 
 // Reads a file to string.
 static auto ReadFile(std::string_view path) -> std::string {
-  std::ifstream proto_file(path);
+  std::ifstream proto_file{std::string(path)};
   std::stringstream buffer;
   buffer << proto_file.rdbuf();
   proto_file.close();