| Index: compiled/intrusive_ptr.h |
| diff --git a/compiled/intrusive_ptr.h b/compiled/intrusive_ptr.h |
| index 1a607ac6017406af5c83251c7cd6a12df4fda111..47533a6c451a8f5ad44f269f5aebd0ce8b93b88f 100644 |
| --- a/compiled/intrusive_ptr.h |
| +++ b/compiled/intrusive_ptr.h |
| @@ -60,10 +60,10 @@ private: |
| int mRefCount; |
| }; |
| -template<typename T, |
| - class = typename std::enable_if<std::is_base_of<ref_counted,T>::value>::type> |
| +template<typename T> |
| class intrusive_ptr |
| { |
| + static_assert(std::is_base_of<ref_counted, T>::value, "The class T should inherit ref_counted"); |
| public: |
| explicit intrusive_ptr() |
| : mPointer(nullptr) |
| @@ -119,9 +119,9 @@ public: |
| intrusive_ptr().swap(*this); |
| } |
| - void reset(T* other) |
| + void reset(T* other, bool addRef = true) |
| { |
| - intrusive_ptr(other).swap(*this); |
| + intrusive_ptr(other, addRef).swap(*this); |
| } |
| const T* get() const |