https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120015

            Bug ID: 120015
           Summary: internal compiler error: in unify, at cp/pt.cc:25969
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldalessandro at gmail dot com
  Target Milestone: ---

Invalid code uses tag<T> without a second parameter.

    template <class T, auto = []{}>
    struct tag {};

    template <class T>
    bool foo(tag<T>);

    tag<int> x;
    auto y = foo(x);

Works for valid code:

    template <class T, auto v>
    bool foo(tag<T, v>);

Live: https://godbolt.org/z/YKorqs95P [April 29th, 2025]
  • [Bug c++/120015] New: internal ... ldalessandro at gmail dot com via Gcc-bugs

Reply via email to