Explorar el Código

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

wuye9036 hace 8 años
padre
commit
c3c4897329
Se han modificado 1 ficheros con 1 adiciones y 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
 );
 ```