§ 14.8.2.5 (Deducing template arguments from a type) paragraph 5 lists the contexts in which template arguments cannot be deduced. The relevant one is the last one in the list:
— A function parameter pack that does not occur at the end of the parameter-declaration-clause.
So in:
struct Erase<ToErase, TypeList<Head..., ToErase, Tail...>>
Head
cannot be deduced; it does not occur at the end of a parameter list.
By contrast, in:
struct Append<TypeList<ToAppend...>, TypeList<List...>>
Both ToAppend
and List
appear at the end of their respective parameter lists, and hence they can be deduced.