Skip to content

Commit 0247488

Browse files
committed
resolve changkun#26, typo in return
1 parent 1bbfbdf commit 0247488

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

book/zh-cn/02-usability.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,7 @@ std::cout << "q: " << q << std::endl;
452452
简单来说,`decltype(auto)` 主要用于对转发函数或封装的返回类型进行推导,它使我们无需显式的指定 `decltype` 的参数表达式。考虑看下面的例子,当我们需要对下面两个函数进行封装时:
453453

454454
```cpp
455-
std::string lookup1(std::string &str) {
456-
return
457-
}
455+
std::string lookup1();
458456
std::string& lookup2();
459457
```
460458

0 commit comments

Comments
 (0)