diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 783479cb3..e3e20dfbd 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -1169,8 +1169,8 @@ class GenericValue { \return Iterator to member, if it exists. Otherwise returns \ref MemberEnd(). */ - MemberIterator FindMember(const std::basic_string& name) { return FindMember(StringRef(name)); } - ConstMemberIterator FindMember(const std::basic_string& name) const { return FindMember(StringRef(name)); } + MemberIterator FindMember(const std::basic_string& name) { return FindMember(GenericValue(StringRef(name))); } + ConstMemberIterator FindMember(const std::basic_string& name) const { return FindMember(GenericValue(StringRef(name))); } #endif //! Add a member (name-value pair) to the object.