Skip to content

Commit

Permalink
Merge pull request #698 from jseward/master
Browse files Browse the repository at this point in the history
Add std::string overload to PrettyWriter::Key() when RAPIDJSON_HAS_STDSTRING is #defined
  • Loading branch information
miloyip committed Jul 27, 2016
2 parents 67d8a99 + 78a7ecb commit c76ebf9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/rapidjson/prettywriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
}

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;
Expand Down

0 comments on commit c76ebf9

Please sign in to comment.