public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50500] New: [C++0x] [DR 1082] move constructor should cause copy constructor to be deleted, but still declared
@ 2011-09-23 23:59 jason at gcc dot gnu.org
  2011-10-17 19:43 ` [Bug c++/50500] " jason at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-09-23 23:59 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50500
           Summary: [C++0x] [DR 1082] move constructor should cause copy
                    constructor to be deleted, but still declared
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org


G++ still suppresses the copy constructor declaration when there is a move
constructor, which was changed by DR 1082.

This should complain about a deleted function:


template <class T> T&& move(T& t);

struct X
{
  X() : x(1) {}
  explicit X(X&& other) : x(other.x) { other.x = -1; }
  int x;
};

int main()
{
  X x;
  X x2 = move(x); // { dg-error "deleted" }                                     
}


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

end of thread, other threads:[~2011-11-01 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23 23:59 [Bug c++/50500] New: [C++0x] [DR 1082] move constructor should cause copy constructor to be deleted, but still declared jason at gcc dot gnu.org
2011-10-17 19:43 ` [Bug c++/50500] " jason at gcc dot gnu.org
2011-10-18 17:41 ` jason at gcc dot gnu.org
2011-10-18 18:06 ` jason at gcc dot gnu.org
2011-11-01 13:49 ` 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).