From 4b0d980d5470ddfbe602200a019711fe5ac71fd5 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 22 Jul 2023 20:22:25 +0200 Subject: [PATCH] impr: Don't use fmt::println if it's not supported --- lib/libimhex/include/hex/helpers/fmt.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/include/hex/helpers/fmt.hpp b/lib/libimhex/include/hex/helpers/fmt.hpp index 734c167fc..7245a87aa 100644 --- a/lib/libimhex/include/hex/helpers/fmt.hpp +++ b/lib/libimhex/include/hex/helpers/fmt.hpp @@ -18,7 +18,10 @@ namespace hex { template inline void println(std::string_view format, Args... args) { - fmt::println(fmt::runtime(format), args...); + if constexpr (requires { fmt::println(fmt::runtime(format), args...); }) + fmt::println(fmt::runtime(format), args...); + else + fmt::print(fmt::runtime(format), args...); } } \ No newline at end of file