Skip to content

Commit 5d08d6b

Browse files
authored
Update stl_map.md typo fix
1 parent 8f898da commit 5d08d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/stl_map.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,7 @@ typename map<K, T>::value_type; // 不能省略
17321732
typename map<int, string>::value_type; // 可以省略,但你加了也没关系
17331733
```
17341734

1735-
> {{ icon.detail }} 含有 T 的类型表达式称为 dependant-type,根本原因是因为在不知道具体是类型表达式还是值表达式的情况下,编译器无法区分模板的 `<` 和小于符号 `<`,以及类型的指针 `*` 和数值乘法 `*`。默认会认为是小于符号和数值乘法,加上 `typename` 后明确前面这一串是类型表达式,才知道这是模板的 `<` 和指针的 `*`。
1735+
> {{ icon.detail }} 含有 T 的类型表达式称为 dependent-type,根本原因是因为在不知道具体是类型表达式还是值表达式的情况下,编译器无法区分模板的 `<` 和小于符号 `<`,以及类型的指针 `*` 和数值乘法 `*`。默认会认为是小于符号和数值乘法,加上 `typename` 后明确前面这一串是类型表达式,才知道这是模板的 `<` 和指针的 `*`。
17361736

17371737
### decltype 大法好
17381738

0 commit comments

Comments
 (0)