Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Noakes <git@drewnoakes.com>2015-02-02 12:21:28 +0300
committerDrew Noakes <git@drewnoakes.com>2015-02-02 12:21:28 +0300
commit3cfd675163c0ac1f013b00aa4c1bd4ceed351d28 (patch)
treef93bd4b02bc9c691346bebd2827f301bb9d8856c /include/rapidjson/writer.h
parent4cc36058491b4c94edcb6b3e5796d8ceaf6a4bab (diff)
Add std::string overload to Writer when RAPIDJSON_HAS_STDSTRING defined.
Diffstat (limited to 'include/rapidjson/writer.h')
-rw-r--r--include/rapidjson/writer.h6
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);