summaryrefslogtreecommitdiffstats
path: root/indexlib/boost-compat/shared_ptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/boost-compat/shared_ptr.h')
-rw-r--r--indexlib/boost-compat/shared_ptr.h46
1 files changed, 7 insertions, 39 deletions
diff --git a/indexlib/boost-compat/shared_ptr.h b/indexlib/boost-compat/shared_ptr.h
index c236e3bd..a369dc0f 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)
@@ -106,7 +106,6 @@ template<class T> class shared_ptr
{
private:
- // Borland 5.5.1 specific workaround
typedef shared_ptr<T> this_type;
public:
@@ -139,8 +138,8 @@ public:
// generated copy constructor, assignment, destructor are fine...
-// except that Borland C++ has a bug, and g++ with -Wsynth warns
-#if defined(__BORLANDC__) || defined(__GNUC__)
+// except that g++ with -Wsynth warns
+#if defined(__GNUC__)
shared_ptr & operator=(shared_ptr const & r) // never throws
{
@@ -191,18 +190,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 +202,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);
@@ -268,14 +244,6 @@ public:
return px != 0;
}
-#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
- typedef T * (this_type::*unspecified_bool_type)() const;
-
- operator unspecified_bool_type() const // never throws
- {
- return px == 0? 0: &this_type::get;
- }
-
#else
typedef T * this_type::*unspecified_bool_type;