diff options
Diffstat (limited to 'JavaScriptCore/wtf/OwnPtr.h')
-rw-r--r-- | JavaScriptCore/wtf/OwnPtr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/JavaScriptCore/wtf/OwnPtr.h b/JavaScriptCore/wtf/OwnPtr.h index cadfad2..cdc277c 100644 --- a/JavaScriptCore/wtf/OwnPtr.h +++ b/JavaScriptCore/wtf/OwnPtr.h @@ -23,6 +23,7 @@ #include "Assertions.h" #include "Noncopyable.h" +#include "NullPtr.h" #include "OwnPtrCommon.h" #include "TypeTraits.h" #include <algorithm> @@ -72,6 +73,7 @@ namespace WTF { operator UnspecifiedBoolType() const { return m_ptr ? &OwnPtr::m_ptr : 0; } OwnPtr& operator=(const PassOwnPtr<T>&); + OwnPtr& operator=(std::nullptr_t) { clear(); return *this; } template<typename U> OwnPtr& operator=(const PassOwnPtr<U>&); void swap(OwnPtr& o) { std::swap(m_ptr, o.m_ptr); } |