From fc03a9b99cef2743d60d6f50d6eb354bf0c2563c Mon Sep 17 00:00:00 2001 From: welch Date: Wed, 11 Dec 2024 15:29:52 +0800 Subject: [PATCH] Fix typo: smater_ptr -> smart_ptr --- learn_class/modern_cpp_30/smart_ptr/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/learn_class/modern_cpp_30/smart_ptr/README.md b/learn_class/modern_cpp_30/smart_ptr/README.md index 27ca484a..dede89e4 100644 --- a/learn_class/modern_cpp_30/smart_ptr/README.md +++ b/learn_class/modern_cpp_30/smart_ptr/README.md @@ -33,12 +33,12 @@ private: ```cpp template -class smater_ptr { +class smart_ptr { public: - explicit smater_ptr( + explicit smart_ptr( T* ptr = nullptr) : ptr_(ptr) {} - ~smater_ptr() + ~smart_ptr() { delete ptr_; } @@ -54,7 +54,7 @@ private: ```cpp template -class smater_ptr { +class smart_ptr { public: ... T& operator*() const { return *ptr_; }