Skip to content

Commit 1335f70

Browse files
Use std::unique_ptr instead of std::scoped_ptr
scoped_ptr has never been a part of the C++ standard - perhaps it's been confused with boost::scoped_ptr. Anyhow, std::unique_ptr is the replacement for the now-deprecated std::auto_ptr.
1 parent 3eda8a6 commit 1335f70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib_json/json_reader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static int stackDepth_g = 0; // see readValue()
4444
namespace Json {
4545

4646
#if __GNUC__ >= 6
47-
typedef std::scoped_ptr<CharReader> const CharReaderPtr;
47+
typedef std::unique_ptr<CharReader> const CharReaderPtr;
4848
#else
4949
typedef std::auto_ptr<CharReader> CharReaderPtr;
5050
#endif

src/lib_json/json_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
namespace Json {
5656

5757
#if __GNUC__ >= 6
58-
typedef std::scoped_ptr<StreamWriter> const StreamWriterPtr;
58+
typedef std::unique_ptr<StreamWriter> const StreamWriterPtr;
5959
#else
6060
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
6161
#endif

0 commit comments

Comments
 (0)