https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104326
--- Comment #2 from Michael Colavita <colavitam at gmail dot com> --- It doesn't appear to be specific to the long and unsigned case. The problem persists if you change unsigned to another type (or replace it with something like a member pointer). I can't find an accepted case where the non-type parameter type of O3 is different than the non-type parameter type of O2/O1. e.g. the following still fails: /* ... */ struct S { long field; }; template <long T> struct O1 {}; template <long T> struct O2 {}; template <long S::* T> struct O3 {}; Test<tuple<O1<1>, O2<3>>> test1; Test<tuple<O1<1>, O2<3>, O3<&S::field>>> test2;