@@ -2106,7 +2106,7 @@ void foo(T t, typename U::type u) {
21062106}
21072107
21082108void 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
21292129void 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}
21672167void 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() {
25112511template <typename ArgT> void foo(ArgT&& a);
25122512```
25132513
2514- 加入我们要限定ArgT只能是 float 的衍生类型,那么写成下面这个样子是不对的,它实际上只能接受 float 的右值引用。
2514+ 假如我们要限定ArgT只能是 float 的衍生类型,那么写成下面这个样子是不对的,它实际上只能接受 float 的右值引用。
25152515
25162516```C++
25172517void foo(float&& a);
0 commit comments