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
1 changed files with 4 additions and 1 deletions

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...);
}
}