From 6f6531f40c0f693c7feb7913f9c02dfa837a5336 Mon Sep 17 00:00:00 2001 From: ehds Date: Thu, 20 Dec 2018 00:03:46 +0800 Subject: [PATCH] fix: typo (#49) --- book/zh-cn/03-runtime.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/zh-cn/03-runtime.md b/book/zh-cn/03-runtime.md index a63358e..919490a 100644 --- a/book/zh-cn/03-runtime.md +++ b/book/zh-cn/03-runtime.md @@ -236,7 +236,7 @@ void reference(std::string&& str) { int main() { std::string lv1 = "string,"; // lv1 是一个左值 - // std::string&& r1 = s1; // 非法, 右值引用不能引用左值 + // std::string&& r1 = lv1; // 非法, 右值引用不能引用左值 std::string&& rv1 = std::move(lv1); // 合法, std::move可以将左值转移为右值 std::cout << rv1 << std::endl; // string,