Sitelet https://web.archive.org/web/20201129041024/https://github.com/changkun/modern-cpp-tutorial/pull/139
Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

update 05-pointers.md #139

Closed
wants to merge 3 commits into from
Closed

update 05-pointers.md #139

wants to merge 3 commits into from

Conversation

@ucasFL
Copy link
Contributor

@ucasFL ucasFL commented Nov 2, 2020

resolve #issue_id

Description

Please describe the motivation of this pull request, and what problem was solved in this PR.

Change List

  • Fix typo error of XXX
  • Add description regarding XXX feature
  • Resolve error content of XXX

Reference

Please add reference if necessary


说明

此处详细说明 PR 的动机是什么、解决了什么样的问题。

变化箱单

  • 修复了 XXX 的 typo 错误
  • 增加了 XXX 相关的说明
  • 解决了关于 XXX 的描述性错误

参考文献

如果有请注明

ucasFL added 3 commits Oct 29, 2020
@ucasFL ucasFL force-pushed the ucasFL:master branch from 63e346c to 04d081f Nov 2, 2020
@@ -97,6 +97,8 @@ std::unique_ptr<int> pointer2 = pointer; // 非法
> ```
>
> 至于为什么没有提供,C++ 标准委员会主席 Herb Sutter 在他的[博客](https://herbsutter.com/gotw/_102/)中提到原因是因为『被他们忘记了』。
注:从 C++14 开始提供了 `std::make_unique`,其用法和原理与 `std::make_shared` 相同。

This comment has been minimized.

@changkun

changkun Nov 3, 2020
Owner

在第 86 行已经包含这段信息了:

std::unique_ptr<int> pointer = std::make_unique<int>(10); // make_unique 从 C++14 引入

似乎没有必要进行此修改。

@@ -96,6 +96,8 @@ std::unique_ptr<int> pointer2 = pointer; // illegal
>
> As for why it wasn't provided, Herb Sutter, chairman of the C++ Standards Committee, mentioned in his [blog](https://herbsutter.com/gotw/_102/) that it was because they were forgotten.
Note: Since C++14, `std::make_unique` is provided, and its usage and principle are the same as `std::make_shared`.

This comment has been minimized.

@changkun

changkun Nov 3, 2020
Owner

同理

@@ -22,7 +22,7 @@
你可以选择以下几种阅读方式:

1. [GitHub 在线](./book/zh-cn/toc.md)
2. [PDF 文档](https://changkun.de/modern-cpp/modern-cpp-tutorial-zh-cn.pdf)
2. [PDF 文档](https://changkun.de/modern-cpp/pdf/modern-cpp-tutorial-zh-cn.pdf)

This comment has been minimized.

@changkun

changkun Nov 3, 2020
Owner

似乎此修改已经在 master 分支上得到修复了

@ucasFL ucasFL closed this Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.