Browse Source

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

lvxy1024 11 months ago
parent
commit
d1a7987ffe
1 changed files with 1 additions and 1 deletions
  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>