1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Fixed the Intel compiler problem with the JSON classes

This commit is contained in:
Guido Cossu 2017-09-08 15:18:59 +01:00
parent 13fa70ac1a
commit 1950ac9294
3 changed files with 7226 additions and 7076 deletions

File diff suppressed because it is too large Load Diff

View File

@ -76,10 +76,9 @@ void JSONWriter::delete_comma()
// annoying, but necessary for TravisCI
namespace Grid
{
template<>
void JSONWriter::writeDefault(const std::string &s, const std::string &x)
{
//std::cout << "JSONWriter::writeDefault(string) : " << s << std::endl;
//std::cout << "JSONWriter::writeDefault(string) : " << s << std::endl;
std::ostringstream os;
os << std::boolalpha << x;
if (s.size())

View File

@ -64,6 +64,8 @@ namespace Grid
template<std::size_t N>
void writeDefault(const std::string &s, const char(&x)[N]);
void writeDefault(const std::string &s, const std::string &x);
private:
void delete_comma();
@ -120,22 +122,6 @@ namespace Grid
ss_ << os.str() << " ," ;
}
// specialize for string
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 << "\" : \"" << os.str() << "\" ," ;
else
ss_ << os.str() << " ," ;
}
template <typename U>
void JSONWriter::writeDefault(const std::string &s, const std::complex<U> &x)
{