Patch Json library to compile with -std=c++11 and gcc
This commit is contained in:
parent
bf47af280f
commit
33cf766340
@ -69,7 +69,8 @@ license you like.
|
|||||||
// //////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// Tell C++11 where to find std::unique_ptr
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
#ifndef JSON_AMALGATED_H_INCLUDED
|
#ifndef JSON_AMALGATED_H_INCLUDED
|
||||||
|
@ -219,11 +219,9 @@ static int stackDepth_g = 0; // see readValue()
|
|||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
|
||||||
typedef std::unique_ptr<CharReader> CharReaderPtr;
|
|
||||||
#else
|
|
||||||
typedef std::auto_ptr<CharReader> CharReaderPtr;
|
typedef std::auto_ptr<CharReader> CharReaderPtr;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Implementation of class Features
|
// Implementation of class Features
|
||||||
// ////////////////////////////////
|
// ////////////////////////////////
|
||||||
@ -3965,6 +3963,8 @@ Value& Path::make(Value& root) const {
|
|||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
|
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
#elif defined(WIN32)
|
||||||
|
#define snprintf _snprintf
|
||||||
#elif __cplusplus >= 201103L
|
#elif __cplusplus >= 201103L
|
||||||
#define snprintf std::snprintf
|
#define snprintf std::snprintf
|
||||||
#endif
|
#endif
|
||||||
@ -3976,11 +3976,7 @@ Value& Path::make(Value& root) const {
|
|||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
|
||||||
typedef std::unique_ptr<StreamWriter> StreamWriterPtr;
|
|
||||||
#else
|
|
||||||
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
|
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
|
||||||
#endif
|
|
||||||
|
|
||||||
static bool containsControlCharacter(const char* str) {
|
static bool containsControlCharacter(const char* str) {
|
||||||
while (*str) {
|
while (*str) {
|
||||||
|
Loading…
Reference in New Issue
Block a user