Skip to content

Commit 89060d4

Browse files
HaoyuanLuochangkun
authored andcommitted
book: fix typo in 03-runtime.md (changkun#95)
fix chapter3.7 perfect.forward code err.
1 parent a98686b commit 89060d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/zh-cn/03-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ void pass(T&& v) {
470470
std::cout << " std::forward 传参: ";
471471
reference(std::forward<T>(v));
472472
std::cout << "static_cast<T&&> 传参: ";
473-
reference(std::forward<T>(v));
473+
reference(static_cast<T&&>(v));
474474
}
475475
int main() {
476476
std::cout << "传递右值:" << std::endl;

0 commit comments

Comments
 (0)