Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/en-us/02-usability.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ auto arr = new auto(10); // arr as int *
### decltype

The `decltype` keyword is used to solve the defect that the auto keyword
can only type the variable. Its usage is very similar to `sizeof`:
can only type the variable. Its usage is very similar to `typeof`:


```cpp
Expand Down
2 changes: 1 addition & 1 deletion book/zh-cn/02-usability.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ auto arr = new auto(10); // arr 被推导为 int *

### decltype

`decltype` 关键字是为了解决 auto 关键字只能对变量进行类型推导的缺陷而出现的。它的用法和 `sizeof` 很相似:
`decltype` 关键字是为了解决 auto 关键字只能对变量进行类型推导的缺陷而出现的。它的用法和 `typeof` 很相似:

```cpp
decltype(表达式)
Expand Down