Merge pull request #867 from fluidsonic/clang-9

fixed clang 9 compile errors in shared_object_ptr
This commit is contained in:
Eduardo Bart 2017-11-04 10:53:46 -02:00 committed by GitHub
當前提交 c9bc9e327d
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 1 次插入1 次删除

查看文件

@ -73,7 +73,7 @@ public:
}
shared_object_ptr(shared_object_ptr const& rhs): px(rhs.px) { if(px != nullptr) add_ref(); }
template<class U>
shared_object_ptr(shared_object_ptr<U> const& rhs, typename std::is_convertible<U,T>::type* = nullptr) : px(rhs.get()) { if(px != nullptr) add_ref(); }
shared_object_ptr(shared_object_ptr<U> const& rhs, typename std::enable_if<std::is_convertible<U*,T*>::value, U*>::type = nullptr) : px(rhs.get()) { if(px != nullptr) add_ref(); }
~shared_object_ptr() { if(px != nullptr) dec_ref(); }
void reset() { shared_object_ptr().swap(*this); }