aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index d0361e6..05f2634 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -32,6 +32,7 @@
#include <cstddef>
#include <cstring>
#include <malloc.h>
+#include <ostream>
#ifndef MAX_SIZE_T
#define MAX_SIZE_T (~(size_t)0)
@@ -552,4 +553,8 @@ string::size_type string::find(const value_type *str, size_type pos) const
return static_cast<size_type>(delta);
}
+ostream& operator<<(ostream& os, const string& str) {
+ return os.write_formatted(str.data(), str.size());
+}
+
} // namespace std