summaryrefslogtreecommitdiffstats
path: root/indexlib/boost-compat/scoped_ptr.h
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-01-23 10:13:00 +0900
committerMichele Calgaro <[email protected]>2024-01-23 10:13:00 +0900
commitd2f343cc239e1fa25c9581cf35bada96692c41db (patch)
tree52a60c0c804e42a990ffb27ca69c54d7467ea814 /indexlib/boost-compat/scoped_ptr.h
parent3b3f9ec8f31978030c17309fae48335bea5c1587 (diff)
downloadtdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.tar.gz
tdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.zip
Replace auto_ptr
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'indexlib/boost-compat/scoped_ptr.h')
-rw-r--r--indexlib/boost-compat/scoped_ptr.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/indexlib/boost-compat/scoped_ptr.h b/indexlib/boost-compat/scoped_ptr.h
index 60078bf1a..41d4f9b8e 100644
--- a/indexlib/boost-compat/scoped_ptr.h
+++ b/indexlib/boost-compat/scoped_ptr.h
@@ -15,7 +15,7 @@
#include "checked_delete.h"
-#include <memory> // for std::auto_ptr
+#include <memory>
#include <assert.h>
namespace boost
@@ -25,7 +25,7 @@ namespace boost
// scoped_ptr mimics a built-in pointer except that it guarantees deletion
// of the object pointed to, either on destruction of the scoped_ptr or via
// an explicit reset(). scoped_ptr is a simple solution for simple needs;
-// use shared_ptr or std::auto_ptr if your needs are more complex.
+// use shared_ptr or std::unique_ptr if your needs are more complex.
template<class T> class scoped_ptr // noncopyable
{
@@ -46,11 +46,6 @@ public:
{
}
-
- explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws
- {
- }
-
~scoped_ptr() // never throws
{
boost::checked_delete(ptr);