gcc-6 lacks auto_ptr<>

This commit is contained in:
Christopher Dunn 2016-02-06 08:24:20 -06:00
parent dde8426ded
commit e105003bb5
2 changed files with 10 additions and 2 deletions

View File

@ -43,7 +43,11 @@ static int stackDepth_g = 0; // see readValue()
namespace Json {
typedef std::auto_ptr<CharReader> CharReaderPtr;
#if __GNUC__ >= 6
typedef std::scoped_ptr<CharReader> const CharReaderPtr;
#else
typedef std::auto_ptr<CharReader> CharReaderPtr;
#endif
// Implementation of class Features
// ////////////////////////////////

View File

@ -54,7 +54,11 @@
namespace Json {
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
#if __GNUC__ >= 6
typedef std::scoped_ptr<StreamWriter> const StreamWriterPtr;
#else
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
#endif
static bool containsControlCharacter(const char* str) {
while (*str) {