Work around C++20 std::filesystem changes related to u8string

This commit is contained in:
JosJuice
2019-06-21 18:07:59 +02:00
parent f08aa2d842
commit c0a6fa5dcc
4 changed files with 38 additions and 4 deletions

View File

@ -14,6 +14,11 @@
#include "Common/CommonTypes.h"
#ifdef _MSC_VER
#include <filesystem>
#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 <typename I>
std::string ThousandSeparate(I value, int spaces = 0)