From c0a6fa5dcc5a1335ee9eeb940bdfc6934ed01656 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 21 Jun 2019 18:07:59 +0200 Subject: Work around C++20 std::filesystem changes related to u8string --- Source/Core/Common/StringUtil.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/Core/Common/StringUtil.h') diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index 0ee2391e7c..a1adf70b28 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -14,6 +14,11 @@ #include "Common/CommonTypes.h" +#ifdef _MSC_VER +#include +#define HAS_STD_FILESYSTEM +#endif + std::string StringFromFormatV(const char* format, va_list args); std::string StringFromFormat(const char* format, ...) @@ -153,6 +158,11 @@ inline std::string UTF8ToTStr(const std::string& str) #endif +#ifdef HAS_STD_FILESYSTEM +std::filesystem::path StringToPath(std::string_view path); +std::string PathToString(const std::filesystem::path& path); +#endif + // Thousand separator. Turns 12345678 into 12,345,678 template std::string ThousandSeparate(I value, int spaces = 0) -- cgit v1.2.3