diff options
author | Drew Noakes <git@drewnoakes.com> | 2015-02-02 13:05:31 +0300 |
---|---|---|
committer | Drew Noakes <git@drewnoakes.com> | 2015-02-02 13:05:31 +0300 |
commit | e54136d74cb4e3b6ed6fdd9d618e3516a0220bf5 (patch) | |
tree | 7735e1ff82e926db3534cad95d1771fd8a0a7935 /include/rapidjson/prettywriter.h | |
parent | 9d4f0296ff46f83792cfdb81e2ad4e0e16074ef0 (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.h | 6 |
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);
|