Skip to content

Commit 355e75b

Browse files
authored
Merge pull request wuye9036#35 from Praying/master
small fixes
2 parents 32a309d + 6aba25b commit 355e75b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ReadMe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ void foo(T t, typename U::type u) {
21062106
}
21072107
21082108
void callFoo() {
2109-
foo<int, X>(5, 5.0); // T == int, typename U::type == X::type == int
2109+
foo<int, X>(5, 5.0); // T == int, typename U::type == X::type == float
21102110
}
21112111
```
21122112
@@ -2127,7 +2127,7 @@ void foo(T t, typename U::type u) {
21272127
}
21282128
21292129
void callFoo() {
2130-
foo<int, X>(5, 5.0); // T == int, typename U::type == X::type == int
2130+
foo<int, X>(5, 5.0); // T == int, typename U::type == X::type == float
21312131
foo<int, Y>(5, 5.0); // ???
21322132
}
21332133
```
@@ -2165,7 +2165,7 @@ void foo(T t, typename U::type2 u) {
21652165
// ...
21662166
}
21672167
void callFoo() {
2168-
foo<int, X>(5, 5.0); // T == int, typename U::type == X::type == int
2168+
foo<int, X>(5, 5.0); // T == int, typename U::type == X::type == float
21692169
foo<int, Y>( 1, 1.0 ); // ???
21702170
}
21712171
```
@@ -2511,7 +2511,7 @@ void doSomething() {
25112511
template <typename ArgT> void foo(ArgT&& a);
25122512
```
25132513
2514-
加入我们要限定ArgT只能是 float 的衍生类型,那么写成下面这个样子是不对的,它实际上只能接受 float 的右值引用。
2514+
假如我们要限定ArgT只能是 float 的衍生类型,那么写成下面这个样子是不对的,它实际上只能接受 float 的右值引用。
25152515
25162516
```C++
25172517
void foo(float&& a);

0 commit comments

Comments
 (0)