summaryrefslogtreecommitdiff
path: root/asl/format.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-11-23 23:48:24 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-20 15:35:58 +0100
commit3dc9bc3a6cefa30c553c6ec21b1545db98e26b6d (patch)
tree375698480c4f21c48f1f59fed4878a78468dd2a6 /asl/format.hpp
parenta7ebfdedeee84bd01615ad62ac448adae12787db (diff)
Add float formatting
Diffstat (limited to 'asl/format.hpp')
-rw-r--r--asl/format.hpp7
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);