[Bug c++/79143] [7 Regression][new inheriting constructors] inheriting constructor fails with brace initialization

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 7 16:33:00 GMT 2017


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, found the same in the mean time.
Following works, I bet in the #c0 CLASSTYPE_NON_AGGREGATE isn't set on derived
for some reason.

struct base {
  base(int, int) {}
};

template<class>
struct derived : base {
  derived(int, int) : base(0, 0) {}
};

int main() {
  base(13, 42); // Fine
  derived<int>(13, 42); // Fine
  base{13, 42}; // Fine
  derived<int>{13, 42}; // Fine
}


More information about the Gcc-bugs mailing list