Skip to content

Commit f1c1e06

Browse files
author
TinyWang
authored
book: fix the wrong about delctype (changkun#101)
1 parent 0f39561 commit f1c1e06

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

book/en-us/02-usability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ auto arr = new auto(10); // arr as int *
435435
### decltype
436436
437437
The `decltype` keyword is used to solve the defect that the auto keyword
438-
can only type the variable. Its usage is very similar to `sizeof`:
438+
can only type the variable. Its usage is very similar to `typeof`:
439439
440440
441441
```cpp

book/zh-cn/02-usability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ auto arr = new auto(10); // arr 被推导为 int *
369369
370370
### decltype
371371
372-
`decltype` 关键字是为了解决 auto 关键字只能对变量进行类型推导的缺陷而出现的。它的用法和 `sizeof` 很相似:
372+
`decltype` 关键字是为了解决 auto 关键字只能对变量进行类型推导的缺陷而出现的。它的用法和 `typeof` 很相似:
373373
374374
```cpp
375375
decltype(表达式)

0 commit comments

Comments
 (0)