diff options
author | Drew Noakes <git@drewnoakes.com> | 2015-02-02 12:21:28 +0300 |
---|---|---|
committer | Drew Noakes <git@drewnoakes.com> | 2015-02-02 12:21:28 +0300 |
commit | 3cfd675163c0ac1f013b00aa4c1bd4ceed351d28 (patch) | |
tree | f93bd4b02bc9c691346bebd2827f301bb9d8856c /include/rapidjson | |
parent | 4cc36058491b4c94edcb6b3e5796d8ceaf6a4bab (diff) |
Add std::string overload to Writer when RAPIDJSON_HAS_STDSTRING defined.
Diffstat (limited to 'include/rapidjson')
-rw-r--r-- | include/rapidjson/writer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h index 02d66803..6cd5aaf3 100644 --- a/include/rapidjson/writer.h +++ b/include/rapidjson/writer.h @@ -127,6 +127,12 @@ public: return WriteString(str, length);
}
+#if RAPIDJSON_HAS_STDSTRING
+ bool String(const std::basic_string<Ch>& str) {
+ return String(str.data(), SizeType(str.size()));
+ }
+#endif
+
bool StartObject() {
Prefix(kObjectType);
new (level_stack_.template Push<Level>()) Level(false);
|