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 13:05:31 +0300
committerDrew Noakes <git@drewnoakes.com>2015-02-02 13:05:31 +0300
commite54136d74cb4e3b6ed6fdd9d618e3516a0220bf5 (patch)
tree7735e1ff82e926db3534cad95d1771fd8a0a7935 /include/rapidjson/prettywriter.h
parent9d4f0296ff46f83792cfdb81e2ad4e0e16074ef0 (diff)
Add std::string overload to PrettyWriter when RAPIDJSON_HAS_STDSTRING defined.
Diffstat (limited to 'include/rapidjson/prettywriter.h')
-rw-r--r--include/rapidjson/prettywriter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h
index ca62bb7f..9109f6d4 100644
--- a/include/rapidjson/prettywriter.h
+++ b/include/rapidjson/prettywriter.h
@@ -82,6 +82,12 @@ public:
return Base::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() {
PrettyPrefix(kObjectType);
new (Base::level_stack_.template Push<typename Base::Level>()) typename Base::Level(false);