1
0
mirror of synced 2024-11-24 15:50:16 +01:00

impr: Don't use fmt::println if it's not supported

This commit is contained in:
WerWolv 2023-07-22 20:22:25 +02:00
parent 46ee3f0faa
commit 4b0d980d54

View File

@ -18,7 +18,10 @@ namespace hex {
template<typename... Args>
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...);
}
}