[Bug c++/64887] New: Brace initialization of array members when move constructor is deleted or implicit.
cth027 at yahoo dot de
gcc-bugzilla@gcc.gnu.org
Sat Jan 31 17:03:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64887
Bug ID: 64887
Summary: Brace initialization of array members when move
constructor is deleted or implicit.
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: cth027 at yahoo dot de
Created attachment 34634
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34634&action=edit
Test case 1: Failure to compile (move and copy ctors are deleted)
The initialisation of member arrays of type A fail to compile when move
constructor of A is deleted or implicitely defined and A has a member which is
not a base type.
Testcase1 fails to compile because move constructor of A is deleted. The same
code compiles, when the string member of A is removed (Testcase2) or if the
string member of A is replaced with an int member (Testcase3).
Testcase4 fails to compile because the copy constructor of A is deleted, the
move construcor being implicietly defined. The same code compiles if the move
constructor is user defined (Testcase5).
The bug could be related to bug 63707, but it's broader (move and not only copy
constructor) and unrelated to user defined destructor.
More information about the Gcc-bugs
mailing list