https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85977
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Seems like deducing the template parameter N fails because of the type mismatch; parm is long int (element type of the array), while arg is int (element type of {1, 2, 3}): 21789 /* We have already checked cv-qualification at the top of the 21790 function. */ 21791 if (!same_type_ignoring_top_level_qualifiers_p (arg, parm)) 21792 return unify_type_mismatch (explain_p, parm, arg); I guess here's where [over.ics.list]/6 applies so we should try an implicit conversion sequence from int to long.