File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ namespace Json {
45
45
46
46
#if defined(JSON_USE_SCOPED_PTR)
47
47
typedef std::scoped_ptr<CharReader> const CharReaderPtr;
48
+ #elif defined(JSON_USE_UNIQUE_PTR)
49
+ typedef std::unique_ptr<CharReader> const CharReaderPtr;
48
50
#else
49
51
typedef std::auto_ptr<CharReader> CharReaderPtr;
50
52
#endif
Original file line number Diff line number Diff line change 12
12
* It is an internal header that must not be exposed.
13
13
*/
14
14
15
+ // Note that a C++ standard header must be included before this one (the code
16
+ // below indicates that <string> would logically be included) in order to set
17
+ // macros required to test for libstdc++
18
+
15
19
#if defined(__GNUC__) && (__GNUC__ >= 6)
16
20
#define JSON_USE_SCOPED_PTR
21
+ #elif defined(__clang__) && defined(__USE_ISOCXX11) && defined(__GLIBCXX__)
22
+ // clang with libstdc++
23
+ #define JSON_USE_UNIQUE_PTR
17
24
#endif
18
25
19
26
namespace Json {
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ namespace Json {
56
56
57
57
#if defined(JSON_USE_SCOPED_PTR)
58
58
typedef std::scoped_ptr<StreamWriter> const StreamWriterPtr;
59
+ #elif defined(JSON_USE_UNIQUE_PTR)
60
+ typedef std::unique_ptr<StreamWriter> StreamWriterPtr;
59
61
#else
60
62
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
61
63
#endif
You can’t perform that action at this time.
0 commit comments