diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-11-23 23:48:24 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | 3dc9bc3a6cefa30c553c6ec21b1545db98e26b6d (patch) | |
tree | 375698480c4f21c48f1f59fed4878a78468dd2a6 /asl/format.hpp | |
parent | a7ebfdedeee84bd01615ad62ac448adae12787db (diff) |
Add float formatting
Diffstat (limited to 'asl/format.hpp')
-rw-r--r-- | asl/format.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/asl/format.hpp b/asl/format.hpp index 7cf3917..9504701 100644 --- a/asl/format.hpp +++ b/asl/format.hpp @@ -77,11 +77,16 @@ void format(Writer* w, string_view fmt, const Args&... args) template<isize_t N>
void AslFormat(Formatter& f, const char (&str)[N])
{
- f.write(str, N - 1);
+ f.write(string_view(str, N - 1));
}
void AslFormat(Formatter& f, const char* str);
+inline void AslFormat(Formatter& f, string_view sv)
+{
+ f.write(sv);
+}
+
void AslFormat(Formatter& f, float);
void AslFormat(Formatter& f, double);
|