From e7af7ceea2324dcf7d2222986c09d1c478ee4c7e Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 2 Apr 2026 13:22:28 +0200 Subject: kstd: make string formattable --- libs/kstd/include/kstd/string | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libs') diff --git a/libs/kstd/include/kstd/string b/libs/kstd/include/kstd/string index 075422e..4ce19ce 100644 --- a/libs/kstd/include/kstd/string +++ b/libs/kstd/include/kstd/string @@ -1,6 +1,10 @@ #ifndef KSTD_STRING_HPP #define KSTD_STRING_HPP +#include "kstd/bits/format/context.hpp" +#include "kstd/bits/format/formatter.hpp" +#include "kstd/bits/format/formatter/string_view.hpp" + #include #include #include @@ -343,6 +347,15 @@ namespace kstd return !(lhs == rhs); } + template<> + struct formatter : formatter + { + auto format(string const & str, format_context & context) const -> void + { + formatter::format(str.view(), context); + } + }; + } // namespace kstd #endif \ No newline at end of file -- cgit v1.2.3