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:
authorMilo Yip <miloyip@gmail.com>2016-07-27 11:46:31 +0300
committerGitHub <noreply@github.com>2016-07-27 11:46:31 +0300
commitc76ebf98de225aaea9c6f9aaa2425cf24343ce44 (patch)
treed1952d3f4fd64db5996f6b3055d6ed6cbbea0116
parent67d8a99477b4e1b638b920cc9b02f8910dfb05e7 (diff)
parent78a7ecb94672190c117f9e880bbbd692407e74eb (diff)
Merge pull request #698 from jseward/master
Add std::string overload to PrettyWriter::Key() when RAPIDJSON_HAS_STDSTRING is #defined
-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 75dc474f..0dcb0fee 100644
--- a/include/rapidjson/prettywriter.h
+++ b/include/rapidjson/prettywriter.h
@@ -115,6 +115,12 @@ public:
}
bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
+
+#if RAPIDJSON_HAS_STDSTRING
+ bool Key(const std::basic_string<Ch>& str) {
+ return Key(str.data(), SizeType(str.size()));
+ }
+#endif
bool EndObject(SizeType memberCount = 0) {
(void)memberCount;