mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Fixed the Intel compiler problem with the JSON classes
This commit is contained in:
parent
13fa70ac1a
commit
1950ac9294
14281
lib/json/json.hpp
14281
lib/json/json.hpp
File diff suppressed because it is too large
Load Diff
@ -76,10 +76,9 @@ void JSONWriter::delete_comma()
|
|||||||
// annoying, but necessary for TravisCI
|
// annoying, but necessary for TravisCI
|
||||||
namespace Grid
|
namespace Grid
|
||||||
{
|
{
|
||||||
template<>
|
|
||||||
void JSONWriter::writeDefault(const std::string &s, const std::string &x)
|
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;
|
std::ostringstream os;
|
||||||
os << std::boolalpha << x;
|
os << std::boolalpha << x;
|
||||||
if (s.size())
|
if (s.size())
|
||||||
|
@ -64,6 +64,8 @@ namespace Grid
|
|||||||
template<std::size_t N>
|
template<std::size_t N>
|
||||||
void writeDefault(const std::string &s, const char(&x)[N]);
|
void writeDefault(const std::string &s, const char(&x)[N]);
|
||||||
|
|
||||||
|
void writeDefault(const std::string &s, const std::string &x);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void delete_comma();
|
void delete_comma();
|
||||||
@ -120,22 +122,6 @@ namespace Grid
|
|||||||
ss_ << os.str() << " ," ;
|
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>
|
template <typename U>
|
||||||
void JSONWriter::writeDefault(const std::string &s, const std::complex<U> &x)
|
void JSONWriter::writeDefault(const std::string &s, const std::complex<U> &x)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user