Skip to content

Commit 7e4875a

Browse files
committed
__cplusplus value should not be used to decide for std::unique_ptr open-source-parsers#350:
In addition to the C++ language version define __cplusplus also check _CPPLIB_VER for better Dinkumware support.
1 parent 979cbec commit 7e4875a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib_json/json_reader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static int stackDepth_g = 0; // see readValue()
4343

4444
namespace Json {
4545

46-
#if __cplusplus >= 201103L
46+
#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
4747
typedef std::unique_ptr<CharReader> CharReaderPtr;
4848
#else
4949
typedef std::auto_ptr<CharReader> CharReaderPtr;

src/lib_json/json_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
namespace Json {
5656

57-
#if __cplusplus >= 201103L
57+
#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
5858
typedef std::unique_ptr<StreamWriter> StreamWriterPtr;
5959
#else
6060
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;

0 commit comments

Comments
 (0)