File tree 3 files changed +14
-4
lines changed
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 51
51
#define JSON_API
52
52
#endif
53
53
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
+
54
64
// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
55
65
// integer
56
66
// 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()
43
43
44
44
namespace Json {
45
45
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;
48
48
#else
49
49
typedef std::auto_ptr<CharReader> CharReaderPtr;
50
50
#endif
Original file line number Diff line number Diff line change 54
54
55
55
namespace Json {
56
56
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;
59
59
#else
60
60
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
61
61
#endif
You can’t perform that action at this time.
0 commit comments