我找不到办法让这个工作.它甚至可能吗?我不明白为什么不会这样.
template <auto id,typename FirstField,typename... OtherFields> struct FieldTypeById { using Type = int; }; template <auto id> struct FieldTypeById<id,void> { using Type = void; }; int main() { using t1 = FieldTypeById<0,int>::Type; using t2 = FieldTypeById<1>::Type; return 0; }