aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/kstd/include/kstd/string13
1 files changed, 13 insertions, 0 deletions
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 <kstd/cstring>
#include <kstd/os/error.hpp>
#include <kstd/vector>
@@ -343,6 +347,15 @@ namespace kstd
return !(lhs == rhs);
}
+ template<>
+ struct formatter<string> : formatter<std::string_view>
+ {
+ auto format(string const & str, format_context & context) const -> void
+ {
+ formatter<std::string_view>::format(str.view(), context);
+ }
+ };
+
} // namespace kstd
#endif \ No newline at end of file