From 7e4875a239adbe531e421fe9751727186c89bafe Mon Sep 17 00:00:00 2001 From: drgler Date: Sun, 6 Sep 2015 16:13:06 +0200 Subject: [PATCH] __cplusplus value should not be used to decide for std::unique_ptr #350: In addition to the C++ language version define __cplusplus also check _CPPLIB_VER for better Dinkumware support. --- src/lib_json/json_reader.cpp | 2 +- src/lib_json/json_writer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index ade7890..c98b000 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -43,7 +43,7 @@ static int stackDepth_g = 0; // see readValue() namespace Json { -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) typedef std::unique_ptr CharReaderPtr; #else typedef std::auto_ptr CharReaderPtr; diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index f4f1b7f..c85907a 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -54,7 +54,7 @@ namespace Json { -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) typedef std::unique_ptr StreamWriterPtr; #else typedef std::auto_ptr StreamWriterPtr;