From 4bb2e54d12e78ea7ae6b83a051c95aa35ea7d725 Mon Sep 17 00:00:00 2001 From: zzyyyl Date: Tue, 6 Sep 2022 00:33:21 +0800 Subject: [PATCH] fix: fix linux build error --- src/MeoAssistant/AsstUtils.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/MeoAssistant/AsstUtils.hpp b/src/MeoAssistant/AsstUtils.hpp index 1cc734a1e9..dde26f2a99 100644 --- a/src/MeoAssistant/AsstUtils.hpp +++ b/src/MeoAssistant/AsstUtils.hpp @@ -300,11 +300,11 @@ namespace asst::utils } #ifdef _WIN32 - static_assert(std::is_same_v); + static_assert(std::same_as); os_string to_osstring(const std::string& utf8_str); std::string from_osstring(const os_string& os_str); #else - static_assert(std::is_same_v); + static_assert(std::same_as); inline os_string to_osstring(const std::string& utf8_str) { return utf8_str; @@ -320,11 +320,13 @@ namespace asst::utils return std::filesystem::path(os_str); } - template >> +#ifdef _WIN32 + // Allow construct a path from utf8-string in win32 inline std::filesystem::path path(const std::string& utf8_str) { return std::filesystem::path(to_osstring(utf8_str)); } +#endif #ifdef _WIN32