public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53096] New: [c++11] should be possible to default a copy ctor that takes non-const arg
@ 2012-04-23 23:06 eric.niebler at gmail dot com
2012-04-23 23:30 ` [Bug c++/53096] [DR 1333] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2012-04-23 23:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53096
Bug #: 53096
Summary: [c++11] should be possible to default a copy ctor that
takes non-const arg
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: eric.niebler@gmail.com
The following code does not compile:
struct foo
{
foo() = default;
foo(foo &) = default; // ERROR HERE
foo(foo const &) = default;
};
The error is:
error: ‘foo::foo(foo&)’ declared to take non-const reference
cannot be defaulted in the class body
This was correct for the FDIS, but is now incorrect given the resolution for
core issue 1333:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1333
The code above should be accepted.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53096] [DR 1333] [c++11] should be possible to default a copy ctor that takes non-const arg
2012-04-23 23:06 [Bug c++/53096] New: [c++11] should be possible to default a copy ctor that takes non-const arg eric.niebler at gmail dot com
@ 2012-04-23 23:30 ` redi at gcc dot gnu.org
2012-04-26 23:33 ` paolo at gcc dot gnu.org
2013-06-11 10:21 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-23 23:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53096
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |rejects-valid
Last reconfirmed| |2012-04-23
CC| |jason at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|[c++11] should be possible |[DR 1333] [c++11] should be
|to default a copy ctor that |possible to default a copy
|takes non-const arg |ctor that takes non-const
| |arg
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53096] [DR 1333] [c++11] should be possible to default a copy ctor that takes non-const arg
2012-04-23 23:06 [Bug c++/53096] New: [c++11] should be possible to default a copy ctor that takes non-const arg eric.niebler at gmail dot com
2012-04-23 23:30 ` [Bug c++/53096] [DR 1333] " redi at gcc dot gnu.org
@ 2012-04-26 23:33 ` paolo at gcc dot gnu.org
2013-06-11 10:21 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-04-26 23:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53096
--- Comment #1 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-04-26 23:32:17 UTC ---
Author: paolo
Date: Thu Apr 26 23:32:14 2012
New Revision: 186888
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186888
Log:
/cp
2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53096
* class.c (check_bases_and_members): Implement core/1333, do not
disallow defaulted in the class body non-const ref special members.
/testsuite
2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53096
* g++.dg/cpp0x/defaulted35.C: New.
* g++.dg/cpp0x/defaulted15.C: Adjust.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted35.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted15.C
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53096] [DR 1333] [c++11] should be possible to default a copy ctor that takes non-const arg
2012-04-23 23:06 [Bug c++/53096] New: [c++11] should be possible to default a copy ctor that takes non-const arg eric.niebler at gmail dot com
2012-04-23 23:30 ` [Bug c++/53096] [DR 1333] " redi at gcc dot gnu.org
2012-04-26 23:33 ` paolo at gcc dot gnu.org
@ 2013-06-11 10:21 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-11 10:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53096
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.8.0
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.8.0.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-11 10:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 23:06 [Bug c++/53096] New: [c++11] should be possible to default a copy ctor that takes non-const arg eric.niebler at gmail dot com
2012-04-23 23:30 ` [Bug c++/53096] [DR 1333] " redi at gcc dot gnu.org
2012-04-26 23:33 ` paolo at gcc dot gnu.org
2013-06-11 10:21 ` paolo.carlini at oracle dot com
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).