File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 5151#define JSON_API
5252#endif
5353
54+ #if !defined(JSON_HAS_UNIQUE_PTR)
55+ #if __cplusplus >= 201103L
56+ #define JSON_HAS_UNIQUE_PTR (1 )
57+ #elif _MSC_VER >= 1600
58+ #define JSON_HAS_UNIQUE_PTR (1 )
59+ #else
60+ #define JSON_HAS_UNIQUE_PTR (0 )
61+ #endif
62+ #endif
63+
5464// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
5565// integer
5666// Storages, and 64 bits integer support is disabled.
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ static int stackDepth_g = 0; // see readValue()
4343
4444namespace Json {
4545
46- #if __GNUC__ >= 6
47- typedef std::scoped_ptr <CharReader> const CharReaderPtr;
46+ #if JSON_HAS_UNIQUE_PTR
47+ typedef std::unique_ptr <CharReader> const CharReaderPtr;
4848#else
4949typedef std::auto_ptr<CharReader> CharReaderPtr;
5050#endif
Original file line number Diff line number Diff line change 5454
5555namespace Json {
5656
57- #if __GNUC__ >= 6
58- typedef std::scoped_ptr <StreamWriter> const StreamWriterPtr;
57+ #if JSON_HAS_UNIQUE_PTR
58+ typedef std::unique_ptr <StreamWriter> const StreamWriterPtr;
5959#else
6060typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
6161#endif
You can’t perform that action at this time.
0 commit comments