Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / wtf / OwnPtr.h
index a923b15..2c3bc30 100644 (file)
@@ -33,12 +33,7 @@ namespace WTF {
     template<typename T> class PassOwnPtr;
 
     template<typename T> class OwnPtr {
-#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
-        // If rvalue references are not supported, the copy constructor is
-        // public so OwnPtr cannot be marked noncopyable. See note below.
         WTF_MAKE_NONCOPYABLE(OwnPtr);
-#endif
-        WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(OwnPtr);
     public:
         typedef typename RemoveExtent<T>::Type ValueType;
         typedef ValueType* PtrType;
@@ -54,14 +49,6 @@ namespace WTF {
         OwnPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
         bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
 
-#if !COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
-        // This copy constructor is used implicitly by gcc when it generates
-        // transients for assigning a PassOwnPtr<T> object to a stack-allocated
-        // OwnPtr<T> object. It should never be called explicitly and gcc
-        // should optimize away the constructor when generating code.
-        OwnPtr(const OwnPtr&);
-#endif
-
         ~OwnPtr()
         {
             OwnedPtrDeleter<T>::deletePtr(m_ptr);
@@ -89,24 +76,17 @@ namespace WTF {
         OwnPtr& operator=(std::nullptr_t) { clear(); return *this; }
         template<typename U> OwnPtr& operator=(const PassOwnPtr<U>&);
 
-#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
         OwnPtr(OwnPtr&&);
         template<typename U> OwnPtr(OwnPtr<U>&&);
 
         OwnPtr& operator=(OwnPtr&&);
         template<typename U> OwnPtr& operator=(OwnPtr<U>&&);
-#endif
 
         void swap(OwnPtr& o) { std::swap(m_ptr, o.m_ptr); }
 
         static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
 
     private:
-#if !COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
-        // If rvalue references are supported, noncopyable takes care of this.
-        OwnPtr& operator=(const OwnPtr&);
-#endif
-
         // We should never have two OwnPtrs for the same underlying object (otherwise we'll get
         // double-destruction), so these equality operators should never be needed.
         template<typename U> bool operator==(const OwnPtr<U>&) const { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
@@ -176,7 +156,6 @@ namespace WTF {
         return *this;
     }
 
-#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
     template<typename T> inline OwnPtr<T>::OwnPtr(OwnPtr<T>&& o)
         : m_ptr(o.leakPtr())
     {
@@ -208,7 +187,6 @@ namespace WTF {
 
         return *this;
     }
-#endif
 
     template<typename T> inline void swap(OwnPtr<T>& a, OwnPtr<T>& b)
     {