diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/Inputs/modernize-smart-ptr/shared_ptr.h')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/Inputs/modernize-smart-ptr/shared_ptr.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/modernize-smart-ptr/shared_ptr.h b/clang-tools-extra/test/clang-tidy/Inputs/modernize-smart-ptr/shared_ptr.h new file mode 100644 index 00000000000..0f4f2a97095 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/Inputs/modernize-smart-ptr/shared_ptr.h @@ -0,0 +1,24 @@ +namespace std { + +template <typename type> +class shared_ptr { +public: + shared_ptr(); + shared_ptr(type *ptr); + shared_ptr(const shared_ptr<type> &t) {} + shared_ptr(shared_ptr<type> &&t) {} + ~shared_ptr(); + type &operator*() { return *ptr; } + type *operator->() { return ptr; } + type *release(); + void reset(); + void reset(type *pt); + shared_ptr &operator=(shared_ptr &&); + template <typename T> + shared_ptr &operator=(shared_ptr<T> &&); + +private: + type *ptr; +}; + +} // namespace std |