fix: correct typo smater_ptr to smart_ptr

Fix typo in smart pointer implementation class name
This commit is contained in:
Francis
2026-03-12 23:48:04 +08:00
committed by GitHub

View File

@@ -33,12 +33,12 @@ private:
```cpp ```cpp
template <typename T> template <typename T>
class smater_ptr { class smart_ptr {
public: public:
explicit smater_ptr( explicit smart_ptr(
T* ptr = nullptr) T* ptr = nullptr)
: ptr_(ptr) {} : ptr_(ptr) {}
~smater_ptr() ~smart_ptr()
{ {
delete ptr_; delete ptr_;
} }
@@ -54,7 +54,7 @@ private:
```cpp ```cpp
template <typename T> template <typename T>
class smater_ptr { class smart_ptr {
public: public:
... ...
T& operator*() const { return *ptr_; } T& operator*() const { return *ptr_; }