summaryrefslogtreecommitdiffstats
path: root/indexlib/boost-compat
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/boost-compat')
-rw-r--r--indexlib/boost-compat/config/compiler/gcc.h4
-rw-r--r--indexlib/boost-compat/config/stdlib/roguewave.h1
-rw-r--r--indexlib/boost-compat/scoped_ptr.h9
-rw-r--r--indexlib/boost-compat/shared_ptr.h33
4 files changed, 7 insertions, 40 deletions
diff --git a/indexlib/boost-compat/config/compiler/gcc.h b/indexlib/boost-compat/config/compiler/gcc.h
index 2c5ad1981..4be7f408e 100644
--- a/indexlib/boost-compat/config/compiler/gcc.h
+++ b/indexlib/boost-compat/config/compiler/gcc.h
@@ -13,10 +13,6 @@
// GNU C++ compiler setup:
-# if __GNUC__ == 2 && __GNUC_MINOR__ == 91
- // egcs 1.1 won't parse shared_ptr.h without this:
-# define BOOST_NO_AUTO_PTR
-# endif
# if __GNUC__ == 2 && __GNUC_MINOR__ < 95
//
// Prior to gcc 2.95 member templates only partly
diff --git a/indexlib/boost-compat/config/stdlib/roguewave.h b/indexlib/boost-compat/config/stdlib/roguewave.h
index ec3d881b5..452b8421f 100644
--- a/indexlib/boost-compat/config/stdlib/roguewave.h
+++ b/indexlib/boost-compat/config/stdlib/roguewave.h
@@ -73,7 +73,6 @@
// new-style iostreams, and no conformant std::allocator:
//
#if (BOOST_RWSTD_VER < 0x020000)
-# define BOOST_NO_AUTO_PTR
# define BOOST_NO_STRINGSTREAM
# define BOOST_NO_STD_ALLOCATOR
# define BOOST_NO_STD_LOCALE
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);
diff --git a/indexlib/boost-compat/shared_ptr.h b/indexlib/boost-compat/shared_ptr.h
index c236e3bd7..a242c8299 100644
--- a/indexlib/boost-compat/shared_ptr.h
+++ b/indexlib/boost-compat/shared_ptr.h
@@ -26,11 +26,11 @@
#include <boost/detail/shared_count.hpp>
#include <boost/detail/workaround.hpp>
-#include <memory> // for std::auto_ptr
-#include <algorithm> // for std::swap
-#include <functional> // for std::less
-#include <typeinfo> // for std::bad_cast
-#include <iosfwd> // for std::basic_ostream
+#include <memory>
+#include <algorithm>
+#include <functional>
+#include <typeinfo>
+#include <iosfwd>
#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash
# pragma warning(push)
@@ -191,18 +191,6 @@ public:
}
}
-#ifndef BOOST_NO_AUTO_PTR
-
- template<class Y>
- explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
- {
- Y * tmp = r.get();
- pn = detail::shared_count(r);
- detail::sp_enable_shared_from_this( pn, tmp, tmp );
- }
-
-#endif
-
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200)
template<class Y>
@@ -215,17 +203,6 @@ public:
#endif
-#ifndef BOOST_NO_AUTO_PTR
-
- template<class Y>
- shared_ptr & operator=(std::auto_ptr<Y> & r)
- {
- this_type(r).swap(*this);
- return *this;
- }
-
-#endif
-
void reset() // never throws in 1.30+
{
this_type().swap(*this);