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

            Bug ID: 116276
           Summary: [14/15 regression] multiple inheritance CTAD
                    regression with -std=c++23
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jason at gcc dot gnu.org
  Target Milestone: ---

Interesting that this succeeds at -std=c++20.  It works with -std=c++23 on the
13 branch.

template<typename T>
struct Base1 { };

template<typename T>
struct Base2 { };

template<typename T = int>
struct Derived : public Base1<T>, Base2<T> {
    using Base1<T>::Base1;
    using Base2<T>::Base2;
};

Derived d;

wa.C:13:9: error: class template argument deduction failed:
   13 | Derived d;
      |         ^
wa.C:13:9: error: call of overloaded ‘Derived()’ is ambiguous
wa.C:2:8: note: candidate: ‘Derived()-> Derived<T> [with T = int]’
    2 | struct Base1 { };
      |        ^~~~~
wa.C:8:8: note: candidate: ‘Derived()-> Derived<T> [with T = int]’
    8 | struct Derived : public Base1<T>, Base2<T> {
      |        ^~~~~~~

Reply via email to