3 #include <fmt/printf.h>
7 template <
typename... Args>
8 int Fprintf(FILE* stream,
const char* fmt, Args... args) {
10 std::string message = fmt::sprintf(fmt, std::forward<Args>(args)...);
12 return message.size();
14 return fmt::fprintf(stream, fmt, args...);
17 template <
typename... Args>
18 int Printf(
const char* fmt, Args... args) {
20 std::string message = fmt::sprintf(fmt, std::forward<Args>(args)...);
22 return message.size();
int(* nrnpy_pr_stdoe_callback)(int, char *)
int Fprintf(FILE *stream, const char *fmt, Args... args)
int Printf(const char *fmt, Args... args)