Add helper to wrap result of std::filesystem::path::u8string() (#2535)

In C++17 the return type of std::filesystem::path::u8string() is
std::string, but in C++20 the return type changed to std::u8string.

Add a helper to copy a std::u8string to a std::string, to be used when a
std::string is required. This fixes the build for C++20.
This commit is contained in:
David Neto
2025-10-01 16:40:43 -04:00
committed by GitHub
parent ac673e5e8c
commit e92140f82d
3 changed files with 24 additions and 5 deletions

View File

@@ -17,9 +17,10 @@
#include <filesystem>
#include "harness/testHarness.h"
#include "harness/stringHelpers.h"
std::string spvBinariesPath =
(std::filesystem::path("compiler") / "spirv_bin").u8string();
to_string((std::filesystem::path("compiler") / "spirv_bin").u8string());
const std::string spvBinariesPathArg = "--spirv-binaries-path";
void printUsage()