From 196695e37b2b4df8d231d924bf09de4c6cbb2058 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 12 Jul 2024 21:19:43 +0200 Subject: [PATCH] includes/std: Allow `std::print()` and `std::format()` to take any value as format argument again --- includes/std/io.pat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/std/io.pat b/includes/std/io.pat index 95f135d..e55dc72 100644 --- a/includes/std/io.pat +++ b/includes/std/io.pat @@ -9,21 +9,21 @@ namespace auto std { /** Formats the given arguments using the format string and prints the result to the console This function uses the C++20 `std::format` or libfmt's `fmt::format` syntax. - @param fmt Format string + @param fmt Format string or any other value that can be converted to a string @param args Values to use in the formatting */ - fn print(str fmt, auto ... args) { + fn print(auto fmt, auto ... args) { builtin::std::print(fmt, args); }; /** Formats the given arguments using the format string and returns the result as a string This function uses the C++20 `std::format` or libfmt's `fmt::format` syntax. - @param fmt Format string + @param fmt Format string or any other value that can be converted to a string @param args Values to use in the formatting @return The formatted string */ - fn format(str fmt, auto ... args) { + fn format(auto fmt, auto ... args) { return builtin::std::format(fmt, args); };