Skip to content

Commit db7ad75

Browse files
sbc100cdunn2001
authored andcommitted
Don't use unique_ptr on pre-c++11 branch
Don't use C++11 unique_ptr in the 0.y.z branch. Although this usage is guarded with __cplusplus >= 201103 some build configurations (notably chromium) use a C++11-compliant compiler but a pre-11 library. pull open-source-parsers#238
1 parent f4bdc1b commit db7ad75

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/lib_json/json_reader.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ static int stackDepth_g = 0; // see readValue()
3232

3333
namespace Json {
3434

35-
#if __cplusplus >= 201103L
36-
typedef std::unique_ptr<CharReader> CharReaderPtr;
37-
#else
3835
typedef std::auto_ptr<CharReader> CharReaderPtr;
39-
#endif
4036

4137
// Implementation of class Features
4238
// ////////////////////////////////

src/lib_json/json_writer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@
4040

4141
namespace Json {
4242

43-
#if __cplusplus >= 201103L
44-
typedef std::unique_ptr<StreamWriter> StreamWriterPtr;
45-
#else
4643
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
47-
#endif
4844

4945
static bool containsControlCharacter(const char* str) {
5046
while (*str) {

0 commit comments

Comments
 (0)