public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105425] New: ambiguous template instantiation with hana::when
@ 2022-04-28 15:10 ed at catmur dot uk
  2022-04-28 15:46 ` [Bug c++/105425] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ed at catmur dot uk @ 2022-04-28 15:10 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-28 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 15:10 [Bug c++/105425] New: ambiguous template instantiation with hana::when ed at catmur dot uk
2022-04-28 15:46 ` [Bug c++/105425] " mpolacek at gcc dot gnu.org
2022-04-28 15:56 ` [Bug c++/105425] [12/13 Regression] " ppalka at gcc dot gnu.org
2022-04-28 17:11 ` cvs-commit at gcc dot gnu.org
2022-04-28 18:07 ` cvs-commit at gcc dot gnu.org
2022-04-28 18:49 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).