https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105425
Bug ID: 105425 Summary: ambiguous template instantiation with hana::when Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Simplified: template<bool> struct when; template<int> constexpr int B = 1; template<class, class> struct A; template<class T, bool K> struct A<T, when<K>> {}; // fallback template<class C> struct A<C, when<B<0> == 1>> {}; A<int, when<true>> a; "B<0> == 1" is sufficiently complex (?) to trigger the bug (it doesn't need to be dependent on C) but "B<0>" on its own isn't. This affects hana since it uses the when<true> pattern heavily. Per godbolt 11.3.0 is good, 12.0.1 20220426 is bad.