This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68709] New: incorrectly requiring move-constructibility when list-initializing a polymorphic array element of a class member
- From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Dec 2015 23:59:49 +0000
- Subject: [Bug c++/68709] New: incorrectly requiring move-constructibility when list-initializing a polymorphic array element of a class member
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68709
Bug ID: 68709
Summary: incorrectly requiring move-constructibility when
list-initializing a polymorphic array element of a
class member
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
Target Milestone: ---
GCC incorrectly rejects this:
struct A { virtual ~A(); };
struct B {
B();
B(B &&) = delete;
A middle_field;
};
struct C {
C() : b{{}, {}} {}
B b[2];
};
saying:
<stdin>: In constructor âC::C()â:
<stdin>:8:17: error: use of deleted function âB::B(B&&)â
<stdin>:4:3: note: declared here
This is bogus: C's constructor should not invoke the B move constructor.