Skip to content

fix typo #141

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

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/zh-cn/03-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type&& __t) noexcep
可见 `std::forward` 的原理在于巧妙的利用了模板类型推导中产生的差异。

这时我们能回答这样一个问题:为什么在使用循环语句的过程中,`auto&&` 是最安全的方式?
因为当 `auto` 被推到为不同的左右引用时,与 `&&` 的坍缩组合是完美转发。
因为当 `auto` 被推导为不同的左右引用时,与 `&&` 的坍缩组合是完美转发。

## 总结

Expand Down