From 0bcb78d3da3c61d1598be2bc4ab39dd138bb8b97 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 9 May 2021 22:36:37 -0500 Subject: [PATCH] [ox/std] Fix Linux build --- deps/ox/src/ox/std/CMakeLists.txt | 1 + deps/ox/src/ox/std/fmt.hpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/std/CMakeLists.txt b/deps/ox/src/ox/std/CMakeLists.txt index cf71badd..d859f9cc 100644 --- a/deps/ox/src/ox/std/CMakeLists.txt +++ b/deps/ox/src/ox/std/CMakeLists.txt @@ -54,6 +54,7 @@ target_compile_definitions( target_link_libraries( OxStd PUBLIC + $<$:dl> $<$:gcc> OxTraceHook ) diff --git a/deps/ox/src/ox/std/fmt.hpp b/deps/ox/src/ox/std/fmt.hpp index dabf42fb..6f2771af 100644 --- a/deps/ox/src/ox/std/fmt.hpp +++ b/deps/ox/src/ox/std/fmt.hpp @@ -40,13 +40,18 @@ constexpr const char *stringify(const String &s) noexcept { } #if __has_include() -constexpr const char *stringify(const std::string &s) noexcept { +#if __cplusplus >= 202002L +constexpr +#else +inline +#endif +const char *stringify(const std::string &s) noexcept { return s.c_str(); } #endif #if __has_include() -constexpr const char *stringify(const QString &s) noexcept { +inline const char *stringify(const QString &s) noexcept { return s.toUtf8(); } #endif