From edb8470c28667ae91b759e24ab87e1a88d518cf9 Mon Sep 17 00:00:00 2001 From: junpeng Date: Mon, 14 Jan 2019 13:31:02 +0800 Subject: [PATCH] fix: comments (#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 引用的右值-->常量引用 --- 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 919490a..3dd4ef1 100644 --- a/book/zh-cn/03-runtime.md +++ b/book/zh-cn/03-runtime.md @@ -241,7 +241,7 @@ int main() std::cout << rv1 << std::endl; // string, const std::string& lv2 = lv1 + lv1; // 合法, 常量左值引用能够延长临时变量的生命周期 - // lv2 += "Test"; // 非法, 引用的右值无法被修改 + // lv2 += "Test"; // 非法, 常量引用无法被修改 std::cout << lv2 << std::endl; // string,string std::string&& rv2 = lv1 + lv2; // 合法, 右值引用延长临时对象生命周期