[Lldb-commits] [lldb] r207129 - Making a SharingPtr out of a nullptr_t should be a safe and allowed operation
Enrico Granata
egranata at apple.com
Thu Apr 24 10:28:09 PDT 2014
Author: enrico
Date: Thu Apr 24 12:28:09 2014
New Revision: 207129
URL: http://llvm.org/viewvc/llvm-project?rev=207129&view=rev
Log:
Making a SharingPtr out of a nullptr_t should be a safe and allowed operation
Modified:
lldb/trunk/include/lldb/Utility/SharingPtr.h
Modified: lldb/trunk/include/lldb/Utility/SharingPtr.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharingPtr.h?rev=207129&r1=207128&r2=207129&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharingPtr.h (original)
+++ lldb/trunk/include/lldb/Utility/SharingPtr.h Thu Apr 24 12:28:09 2014
@@ -138,6 +138,7 @@ private:
struct nat {int for_bool_;};
public:
SharingPtr();
+ SharingPtr(std::nullptr_t);
template<class Y> explicit SharingPtr(Y* p);
template<class Y> explicit SharingPtr(Y* p, imp::shared_count *ctrl_block);
template<class Y> SharingPtr(const SharingPtr<Y>& r, element_type *p);
@@ -191,6 +192,14 @@ SharingPtr<T>::SharingPtr()
cntrl_(0)
{
}
+
+template<class T>
+inline
+SharingPtr<T>::SharingPtr(std::nullptr_t)
+: ptr_(0),
+cntrl_(0)
+{
+}
template<class T>
template<class Y>
More information about the lldb-commits
mailing list