From 3cfd675163c0ac1f013b00aa4c1bd4ceed351d28 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Mon, 2 Feb 2015 09:21:28 +0000 Subject: [PATCH] Add std::string overload to Writer when RAPIDJSON_HAS_STDSTRING defined. --- include/rapidjson/writer.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h index 02d6680..6cd5aaf 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& str) { + return String(str.data(), SizeType(str.size())); + } +#endif + bool StartObject() { Prefix(kObjectType); new (level_stack_.template Push()) Level(false);