C++ 20 introduces a std::u8string type which is not implicitly coercable to a std::string. Calls to std::filesystem::path::u8string() are thus no longer compatible with the std::string type.
This change forces an explicit cast from std::u8string to std::string in C++ 20 compilations. In C++ 17 compilations, the cast is from std::string to std::string (a noop).
C++ 20 introduces a std::u8string type which is not implicitly coercable to a std::string. Calls to std::filesystem::path::u8string() are thus no longer compatible with the std::string type.
This change forces an explicit cast from std::u8string to std::string in C++ 20 compilations. In C++ 17 compilations, the cast is from std::string to std::string (a noop).
Prompted by looking into integrating https://github.com/hanickadot/compile-time-regular-expressions into spring (which forces dependents to C++20 compilation unless told not to), https://github.com/beyond-all-reason/spring/issues/1181.