mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 03:03:38 +01:00
Fixes compilation error
need ‘typename’ before ‘rapidjson::StreamTraits<InputStream>::StreamCopyType
This commit is contained in:
parent
789761ae1b
commit
8e76a9dcce
@ -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() == '-') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user