diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-23 10:13:00 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-26 11:05:01 +0900 |
| commit | 3b1e4bbb3df6a0de8aa0693038449c6f0359ce91 (patch) | |
| tree | 068068e7b1b6202c635bd655e346f838d715373c /indexlib/boost-compat/scoped_ptr.h | |
| parent | b0f8eef013163b2098c2bb07e93cb9b194338b80 (diff) | |
| download | tdepim-3b1e4bbb3df6a0de8aa0693038449c6f0359ce91.tar.gz tdepim-3b1e4bbb3df6a0de8aa0693038449c6f0359ce91.zip | |
Replace auto_ptr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d2f343cc239e1fa25c9581cf35bada96692c41db)
Diffstat (limited to 'indexlib/boost-compat/scoped_ptr.h')
| -rw-r--r-- | indexlib/boost-compat/scoped_ptr.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/indexlib/boost-compat/scoped_ptr.h b/indexlib/boost-compat/scoped_ptr.h index 60078bf1..41d4f9b8 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); |
