Skip to content

Commit

Permalink
fix a typo in item 28 (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiyuan-Dong authored Jan 2, 2024
1 parent a9f64e9 commit 25a0569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/5.RRefMovSemPerfForw/item28.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ T&& forward(remove_reference_t<T>& param)
Widget widgetFactory(); //返回右值的函数
Widget w; //一个变量(左值)
func(w); //用左值调用func;T被推导为Widget&
func(widgetFactory()); //用又值调用func;T被推导为Widget
func(widgetFactory()); //用右值调用func;T被推导为Widget
```
在auto的写法中,规则是类似的。声明
Expand Down

0 comments on commit 25a0569

Please sign in to comment.