public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64887] New: Brace initialization of array members when move constructor is deleted or implicit.
@ 2015-01-31 17:03 cth027 at yahoo dot de
  2015-01-31 17:05 ` [Bug c++/64887] " cth027 at yahoo dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cth027 at yahoo dot de @ 2015-01-31 17:03 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-31 20:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31 17:03 [Bug c++/64887] New: Brace initialization of array members when move constructor is deleted or implicit cth027 at yahoo dot de
2015-01-31 17:05 ` [Bug c++/64887] " cth027 at yahoo dot de
2015-01-31 17:06 ` cth027 at yahoo dot de
2015-01-31 17:07 ` cth027 at yahoo dot de
2015-01-31 17:08 ` cth027 at yahoo dot de
2015-01-31 20:34 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).