From 7e1f81b26955f9c7f4cb38aa8cd4f8b0cd7ff1f9 Mon Sep 17 00:00:00 2001 From: quran Date: Sat, 19 Aug 2017 17:19:43 +0800 Subject: [PATCH 1/2] replace int to float in comment --- ReadMe.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 10af4f0..2c6a414 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -2106,7 +2106,7 @@ void foo(T t, typename U::type u) { } void callFoo() { - foo(5, 5.0); // T == int, typename U::type == X::type == int + foo(5, 5.0); // T == int, typename U::type == X::type == float } ``` @@ -2127,7 +2127,7 @@ void foo(T t, typename U::type u) { } void callFoo() { - foo(5, 5.0); // T == int, typename U::type == X::type == int + foo(5, 5.0); // T == int, typename U::type == X::type == float foo(5, 5.0); // ??? } ``` @@ -2165,7 +2165,7 @@ void foo(T t, typename U::type2 u) { // ... } void callFoo() { - foo(5, 5.0); // T == int, typename U::type == X::type == int + foo(5, 5.0); // T == int, typename U::type == X::type == float foo( 1, 1.0 ); // ??? } ``` From 6aba25b2fc26e123044724dbe22b51a95f00821f Mon Sep 17 00:00:00 2001 From: quran Date: Sat, 19 Aug 2017 17:22:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8A=A0=E5=85=A5=20=20=E2=80=94>=20?= =?UTF-8?q?=E5=81=87=E5=A6=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 2c6a414..6bc92e7 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -2511,7 +2511,7 @@ void doSomething() { template void foo(ArgT&& a); ``` -加入我们要限定ArgT只能是 float 的衍生类型,那么写成下面这个样子是不对的,它实际上只能接受 float 的右值引用。 +假如我们要限定ArgT只能是 float 的衍生类型,那么写成下面这个样子是不对的,它实际上只能接受 float 的右值引用。 ```C++ void foo(float&& a);