mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 05:54:32 +00:00 
			
		
		
		
	Fix gcc error on JSON compilation
This commit is contained in:
		@@ -69,7 +69,7 @@ void JSONWriter::delete_comma()
 | 
			
		||||
  ss_.str(dlast);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
// here we are hitting a g++ bug (Bug 56480)
 | 
			
		||||
// compiles fine with clang
 | 
			
		||||
// have to wrap in the Grid namespace
 | 
			
		||||
@@ -79,13 +79,16 @@ namespace Grid
 | 
			
		||||
  template<>
 | 
			
		||||
  void JSONWriter::writeDefault(const std::string &s,	const std::string &x)
 | 
			
		||||
  {
 | 
			
		||||
  //std::cout << "JSONWriter::writeDefault(string) : " << s <<  std::endl;
 | 
			
		||||
    std::ostringstream os;
 | 
			
		||||
    os << std::boolalpha << x;
 | 
			
		||||
    if (s.size())
 | 
			
		||||
      ss_ << "\""<< s << "\" : \"" << x << "\" ," ; 
 | 
			
		||||
      ss_ << "\""<< s << "\" : \"" << os.str() << "\" ," ;
 | 
			
		||||
    else
 | 
			
		||||
      ss_ << "\"" << x << "\" ," ;
 | 
			
		||||
     ss_ << os.str() << " ," ;
 | 
			
		||||
  }
 | 
			
		||||
}// namespace Grid 
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// Reader implementation ///////////////////////////////////////////////////////
 | 
			
		||||
JSONReader::JSONReader(const string &fileName)
 | 
			
		||||
 
 | 
			
		||||
@@ -120,6 +120,7 @@ namespace Grid
 | 
			
		||||
     ss_ << os.str() << " ," ;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
  // specialize for string
 | 
			
		||||
  template <>
 | 
			
		||||
  void JSONWriter::writeDefault(const std::string &s, const std::string &x)
 | 
			
		||||
@@ -132,7 +133,7 @@ namespace Grid
 | 
			
		||||
    else
 | 
			
		||||
     ss_ << os.str() << " ," ;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  template <typename U>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user