修改 TypeAt 类模板实例化编译错误,如:TypeAt<0, char, int, double> n = 0;

error: wrong number of template arguments (4, should be 2)
This commit is contained in:
lvxy1024 2023-05-31 18:52:35 +08:00
parent cc4e4afa4a
commit d1a7987ffe

View File

@ -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>