Skip to content

hw02 #84

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

hw02 #84

wants to merge 1 commit into from

Conversation

kyleskyguo
Copy link

-避免函数参数不必要的拷贝
改为 const &

  • 修复智能指针造成的问题 双share_ptr应改后一个为weak_ptr
  • 改用 `unique_ptr
  • 实现拷贝构造函数为深拷贝
  • 说明为什么可以删除拷贝赋值函数 根据三五法则,定义了拷贝构造,需要同时定义或删除拷贝赋值函数
  • 改进 Node 的构造函数

-避免函数参数不必要的拷贝
改为 const &
- 修复智能指针造成的问题
双share_ptr应改后一个为weak_ptr
- 改用 `unique_ptr<Node>
- 实现拷贝构造函数为深拷贝
- 说明为什么可以删除拷贝赋值函数
根据三五法则,定义了拷贝构造,需要同时定义或删除拷贝赋值函数
- 改进 `Node` 的构造函数
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant