Skip to content

Unique ptr catch fix #182

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 4 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
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/en-us/03-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void lambda_expression_capture() {
}
```

In the above code, `important` is an exclusive pointer that cannot be caught.
In the above code, `important` is an exclusive pointer that cannot be caught by value capture using `=`.
At this time we need to transfer it to the rvalue and
initialize it in the expression.

Expand Down
3 changes: 1 addition & 2 deletions book/zh-cn/03-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ int main() {
}
```

在上面的代码中,`important` 是一个独占指针,是不能够被捕获到的,这时候我们需要将其转移为右值,
在表达式中初始化。
在上面的代码中,important 是一个独占指针,是不能够被 "=" 值捕获到,这时候我们可以将其转移为右值,在表达式中初始化。

### 泛型 Lambda

Expand Down