fix a typo in item 28 (#169)

This commit is contained in:
Dong-Yiyuan 2024-01-02 20:54:13 +08:00 committed by GitHub
parent a9f64e914c
commit 25a0569cde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,7 +144,7 @@ T&& forward(remove_reference_t<T>& param)
Widget widgetFactory(); //返回右值的函数
Widget w; //一个变量(左值)
func(w); //用左值调用funcT被推导为Widget&
func(widgetFactory()); //用值调用funcT被推导为Widget
func(widgetFactory()); //用值调用funcT被推导为Widget
```
在auto的写法中规则是类似的。声明