forked from OSchip/llvm-project
Making a SharingPtr out of a nullptr_t should be a safe and allowed operation
llvm-svn: 207129
This commit is contained in:
parent
7d2a5e6862
commit
6bfbdc55f8
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue