public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared
@ 2012-10-22  7:54 daniel.kruegler at googlemail dot com
  2012-10-22  8:28 ` [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-10-22  7:54 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017

             Bug #: 55017
           Summary: [C++11] Rvalue-reference member should cause copy
                    constructor not deleted, but still declared
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com


Using gcc 4.8.0 20121014 (experimental) with the compiler flags

-Wall -pedantic -std=c++11

the following code is incorrectly accepted:

//----------------------
struct S {
  int&& rr;
  S(int&& rr) : rr(static_cast<int&&>(rr)) {}
};

S s1(13);
S s2 = s1; // Should be rejected
//----------------------

This code should be rejected, because a non-static rvalue-reference member
causes the copy-constructor to be deleted as of 12.8 p11 b5. (Note: Even though
12.8 is currently under investigation bei CWG, there are no intentions to
change this part of the wording)


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

end of thread, other threads:[~2013-04-01 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22  7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
2012-10-22  8:28 ` [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be " redi at gcc dot gnu.org
2013-02-14 20:47 ` redi at gcc dot gnu.org
2013-02-14 20:49 ` [Bug c++/55017] [DR 1051] " redi at gcc dot gnu.org
2013-02-15 19:36 ` jason at gcc dot gnu.org
2013-03-17  2:36 ` jason at gcc dot gnu.org
2013-04-01 21:06 ` jason 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).