Skip to content

Commit

Permalink
includes/std: Allow std::print() and std::format() to take any va…
Browse files Browse the repository at this point in the history
…lue as format argument again
  • Loading branch information
WerWolv committed Jul 12, 2024
1 parent bced518 commit 196695e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/std/io.pat
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 196695e

Please sign in to comment.