https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62310
Bug ID: 62310
Summary: fails to consider default initializers (NSDMIs) when
checking inheriting constructors
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
Consider:
struct A { A(int); A() = delete; };
struct B { B(int); B() = delete; };
struct C : B { using B::B; A a = 0; } c(0);
GCC rejects this valid code:
<stdin>:1:114: error: use of deleted function ‘C::C(int)’
<stdin>:1:97: note: ‘C::C(int)’ is implicitly deleted because the default
definition would be ill-formed:
<stdin>:1:97: error: use of deleted function ‘A::A()’
<stdin>:1:20: note: declared here
However, if you remove the '= delete' from A, GCC does in fact call A::A(int),
so this seems to be limited to determining if the inheriting constructor should
be deleted.