diff --git a/lib/utils/mu-utils.hh b/lib/utils/mu-utils.hh index 0b7543fd..c16c0db8 100644 --- a/lib/utils/mu-utils.hh +++ b/lib/utils/mu-utils.hh @@ -44,6 +44,7 @@ #include #include #include +#include namespace Mu { @@ -100,7 +101,7 @@ void mu_error(fmt::format_string frm, T&&... args) noexcept { } /* - * Printing + * Printing; add our wrapper functions, one day we might be able to use std:: */ template @@ -111,6 +112,7 @@ template void mu_println(fmt::format_string frm, T&&... args) noexcept { fmt::println(frm, std::forward(args)...); } + template void mu_printerr(fmt::format_string frm, T&&... args) noexcept { fmt::print(stderr, frm, std::forward(args)...); @@ -121,6 +123,16 @@ void mu_printerrln(fmt::format_string frm, T&&... args) noexcept { } +/* stream */ +template +void mu_print(std::ostream& os, fmt::format_string frm, T&&... args) noexcept { + fmt::print(os, frm, std::forward(args)...); +} +template +void mu_println(std::ostream& os, fmt::format_string frm, T&&... args) noexcept { + fmt::println(os, frm, std::forward(args)...); +} + /* * Fprmatting */