Explorar el Código

修改 TypeAt 类模板实例化编译错误,如:TypeAt<0, char, int, double> n = 0;
error: wrong number of template arguments (4, should be 2)

lvxy1024 hace 11 meses
padre
commit
d1a7987ffe
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      servant/promise/type_list.h

+ 1 - 1
servant/promise/type_list.h

@@ -41,7 +41,7 @@ struct TypeAtImpl<0, TypeList<T, List...> > {
 template <> struct TypeAtImpl<0, TypeList<> > {};
 
 template <size_t N, typename... List>
-using TypeAt = typename TypeAtImpl<N, List...>::Type;
+using TypeAt = typename TypeAtImpl<N, TypeList<List...> >::Type;
 
 // index of a type in a given type list.
 template <typename T, typename List>