Skip to content

Commit 6992831

Browse files
committed
Merge pull request open-source-parsers#367 from Dani-Hub/issue-350-unique_ptr-2
__cplusplus value should not be used to decide for std::unique_ptr resolves open-source-parsers#350
2 parents 979cbec + 7e4875a commit 6992831

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)