From 0247488f7a8e8a7dc763c2fb353fdeb45310c2b7 Mon Sep 17 00:00:00 2001 From: Changkun Ou Date: Sat, 28 Apr 2018 10:51:52 +0200 Subject: [PATCH] resolve #26, typo in return --- book/zh-cn/02-usability.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/book/zh-cn/02-usability.md b/book/zh-cn/02-usability.md index 947e36b..8a149b4 100644 --- a/book/zh-cn/02-usability.md +++ b/book/zh-cn/02-usability.md @@ -452,9 +452,7 @@ std::cout << "q: " << q << std::endl; 简单来说,`decltype(auto)` 主要用于对转发函数或封装的返回类型进行推导,它使我们无需显式的指定 `decltype` 的参数表达式。考虑看下面的例子,当我们需要对下面两个函数进行封装时: ```cpp -std::string lookup1(std::string &str) { - return -} +std::string lookup1(); std::string& lookup2(); ```