Explorar o código

修正了enable_if中Universal Reference的例子中的bug。

wuye9036 %!s(int64=8) %!d(string=hai) anos
pai
achega
c3c4897329
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ReadMe.md

+ 1 - 1
ReadMe.md

@@ -2519,7 +2519,7 @@ template <typename ArgT>
 void foo(
   ArgT&& a, 
   typename std::enabled_if<
-    is_same<ArgT, float>::value
+    is_same<std::decay_t<ArgT>, float>::value
   >::type* = nullptr
 );
 ```