From 8e76a9dcce9128f30059fa4fc842e5c7c5e4b463 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Sun, 29 Jun 2014 21:24:15 +0800 Subject: [PATCH] Fixes compilation error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit need ‘typename’ before ‘rapidjson::StreamTraits::StreamCopyType --- include/rapidjson/reader.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h index 1df5cf8..c772840 100644 --- a/include/rapidjson/reader.h +++ b/include/rapidjson/reader.h @@ -109,7 +109,7 @@ struct BaseReaderHandler { */ template void SkipWhitespace(InputStream& is) { - StreamTraits::StreamCopyType s = is; // Use a local copy for optimization + typename StreamTraits::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 unsigned ParseHex4(InputStream& is) { - StreamTraits::StreamCopyType s = is; // Use a local copy for optimization + typename StreamTraits::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 void ParseString(InputStream& is, Handler& handler) { - StreamTraits::StreamCopyType s = is; // Local copy for optimization + typename StreamTraits::StreamCopyType s = is; // Local copy for optimization if (parseFlags & kParseInsituFlag) { Ch *head = s.PutBegin(); ParseStringToStream(s, s); @@ -499,7 +499,7 @@ private: template void ParseNumber(InputStream& is, Handler& handler) { - StreamTraits::StreamCopyType s = is; // Local copy for optimization + typename StreamTraits::StreamCopyType s = is; // Local copy for optimization // Parse minus bool minus = false; if (s.Peek() == '-') {