diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 198f1d21..fb8ad198 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -603,6 +603,26 @@ std::size_t formatted_size(const CompiledFormat& cf, const Args&... args) { .count(); } +template ::value)> +inline void print(std::FILE* f, const CompiledFormat& cf, Args&&... args) { + using Char = char_t; + using context = buffer_context; + basic_memory_buffer buffer; + format_to(std::back_inserter(buffer), cf, args...); + vprint(f, {buffer.begin(), buffer.size()}, {make_format_args()}); +} + +template ::value)> +inline void print(const CompiledFormat& cf, Args&&... args) { + using Char = char_t; + using context = buffer_context; + basic_memory_buffer buffer; + format_to(std::back_inserter(buffer), cf, args...); + vprint({buffer.begin(), buffer.size()}, {make_format_args()}); +} + FMT_END_NAMESPACE #endif // FMT_COMPILE_H_