1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 06:47:06 +01:00

Compiles after merging

This commit is contained in:
Guido Cossu
2017-01-25 12:11:58 +00:00
parent 17629b8d9e
commit f7fbbaaca3
4 changed files with 39 additions and 14 deletions

View File

@ -68,15 +68,22 @@ void JSONWriter::delete_comma()
ss_.str(dlast);
}
template<>
void JSONWriter::writeDefault(const std::string &s, const std::string &x){
if (s.size())
ss_ << "\""<< s << "\" : \"" << x << "\" ," ;
else
ss_ << "\"" << x << "\" ," ;
}
// here we are hitting a g++ bug (Bug 56480)
// compiles fine with clang
// have to wrap in the Grid namespace
// annoying, but necessary for TravisCI
namespace Grid
{
template<>
void JSONWriter::writeDefault(const std::string &s,
const std::string &x)
{
if (s.size())
ss_ << "\""<< s << "\" : \"" << x << "\" ," ;
else
ss_ << "\"" << x << "\" ," ;
}
}// namespace Grid
// Reader implementation ///////////////////////////////////////////////////////