diff --git a/BAN/include/BAN/Formatter.h b/BAN/include/BAN/Formatter.h index 90d53e1744..e8fd7a50c8 100644 --- a/BAN/include/BAN/Formatter.h +++ b/BAN/include/BAN/Formatter.h @@ -10,14 +10,11 @@ namespace BAN::Formatter struct ValueFormat; - template - inline void print(F putc, const char* format); - - template - inline void print(F putc, const char* format, Arg&& arg, Args&&... args); - template - inline void println(F putc, const char* format, Args&&... args); + concept PrintableArguments = requires(F putc, Args&&... args, const ValueFormat& format) + { + (print_argument(putc, BAN::forward(args), format), ...); + }; template inline void print_argument(F putc, T value, const ValueFormat& format); @@ -53,7 +50,7 @@ namespace BAN::Formatter } } - template + template requires PrintableArguments inline void print(F putc, const char* format, Arg&& arg, Args&&... args) { while (*format && *format != '{')