Commit 8e76a9dc authored by Milo Yip's avatar Milo Yip

Fixes compilation error

need ‘typename’ before
‘rapidjson::StreamTraits<InputStream>::StreamCopyType
parent 789761ae
......@@ -109,7 +109,7 @@ struct BaseReaderHandler {
*/
template<typename InputStream>
void SkipWhitespace(InputStream& is) {
StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization
typename StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization
while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
s.Take();
is = s;
......@@ -378,7 +378,7 @@ private:
// Helper function to parse four hexidecimal digits in \uXXXX in ParseString().
template<typename InputStream>
unsigned ParseHex4(InputStream& is) {
StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization
typename StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization
unsigned codepoint = 0;
for (int i = 0; i < 4; i++) {
Ch c = s.Take();
......@@ -419,7 +419,7 @@ private:
// Parse string and generate String event. Different code paths for kParseInsituFlag.
template<unsigned parseFlags, typename InputStream, typename Handler>
void ParseString(InputStream& is, Handler& handler) {
StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization
typename StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization
if (parseFlags & kParseInsituFlag) {
Ch *head = s.PutBegin();
ParseStringToStream<parseFlags, SourceEncoding, SourceEncoding>(s, s);
......@@ -499,7 +499,7 @@ private:
template<unsigned parseFlags, typename InputStream, typename Handler>
void ParseNumber(InputStream& is, Handler& handler) {
StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization
typename StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization
// Parse minus
bool minus = false;
if (s.Peek() == '-') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment