fix Document::Parse(const Ch*) for transcoding

To allow for an UTF16-Document to Parse(UTF8),
the Parse() argument has to be UTF8-compatible.
This commit is contained in:
Michael Haubenwallner 2015-11-25 19:45:47 +01:00
parent 292714e64a
commit 07672da098

View File

@ -1951,7 +1951,7 @@ public:
\param str Read-only zero-terminated string to be parsed.
*/
template <unsigned parseFlags, typename SourceEncoding>
GenericDocument& Parse(const Ch* str) {
GenericDocument& Parse(const typename SourceEncoding::Ch* str) {
RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag));
GenericStringStream<SourceEncoding> s(str);
return ParseStream<parseFlags, SourceEncoding>(s);