mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-16 20:27:08 +03:00
book: fix typo in 03-runtime.md (#95)
fix chapter3.7 perfect.forward code err.
This commit is contained in:
@@ -470,7 +470,7 @@ void pass(T&& v) {
|
||||
std::cout << " std::forward 传参: ";
|
||||
reference(std::forward<T>(v));
|
||||
std::cout << "static_cast<T&&> 传参: ";
|
||||
reference(std::forward<T>(v));
|
||||
reference(static_cast<T&&>(v));
|
||||
}
|
||||
int main() {
|
||||
std::cout << "传递右值:" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user