From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14512 invoked by alias); 31 Jan 2015 17:03:38 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14492 invoked by uid 48); 31 Jan 2015 17:03:33 -0000 From: "cth027 at yahoo dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64887] New: Brace initialization of array members when move constructor is deleted or implicit. Date: Sat, 31 Jan 2015 17:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cth027 at yahoo dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg03632.txt.bz2 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.