diff options
author | Milo Yip <miloyip@gmail.com> | 2016-07-27 11:46:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-27 11:46:31 +0300 |
commit | c76ebf98de225aaea9c6f9aaa2425cf24343ce44 (patch) | |
tree | d1952d3f4fd64db5996f6b3055d6ed6cbbea0116 | |
parent | 67d8a99477b4e1b638b920cc9b02f8910dfb05e7 (diff) | |
parent | 78a7ecb94672190c117f9e880bbbd692407e74eb (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.h | 6 |
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; |