public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/57153] New: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct @ 2013-05-03 3:03 f.heckenbach@fh-soft.de 2013-05-06 12:09 ` [Bug c++/57153] " daniel.kruegler at googlemail dot com ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: f.heckenbach@fh-soft.de @ 2013-05-03 3:03 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57153 Bug #: 57153 Summary: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: f.heckenbach@fh-soft.de Created attachment 30014 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30014 Test case The included test case produces the following error: % g++-4.7 -std=c++11 test.cpp test.cpp: In constructor 'constexpr B<0>::B()': test.cpp:8:8: error: use of deleted function 'A::A(const A&)' test.cpp:4:3: error: declared here test.cpp: In function 'int main()': test.cpp:17:9: note: synthesized method 'constexpr B<0>::B()' first required here I don't think a copy constructor of the member should be needed for the default constructor of the containing struct. The error disappears when I declare the latter explicitly, but not when I declare it as "= default". Is also disappears if struct B is not a template. I don't see why this should make a difference. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57153] [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct 2013-05-03 3:03 [Bug c++/57153] New: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct f.heckenbach@fh-soft.de @ 2013-05-06 12:09 ` daniel.kruegler at googlemail dot com 2014-11-18 10:46 ` paolo.carlini at oracle dot com 2014-11-18 11:38 ` paolo.carlini at oracle dot com 2 siblings, 0 replies; 4+ messages in thread From: daniel.kruegler at googlemail dot com @ 2013-05-06 12:09 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57153 Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler at | |googlemail dot com --- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2013-05-06 12:09:34 UTC --- I agree that the code should be accepted, because the member initializer performs direct-initialization. The very same problem also exists for gcc 4.9.0 20130428 (experimental). >From gcc-bugs-return-421693-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 06 12:16:16 2013 Return-Path: <gcc-bugs-return-421693-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 6104 invoked by alias); 6 May 2013 12:16:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 6072 invoked by uid 48); 6 May 2013 12:16:12 -0000 From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57183] [C++11] auto and -Wunused-variable Date: Mon, 06 May 2013 12:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: 4.8.1 X-Bugzilla-Changed-Fields: Status AssignedTo Target Milestone Message-ID: <bug-57183-4-hlwdTINTCC@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-57183-4@http.gcc.gnu.org/bugzilla/> References: <bug-57183-4@http.gcc.gnu.org/bugzilla/> X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg00366.txt.bz2 Content-length: 612 http://gcc.gnu.org/bugzilla/show_bug.cgi?idW183 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot |gnu.org |com Target Milestone|--- |4.8.1 --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-05-06 12:16:12 UTC --- I have a patch. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57153] [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct 2013-05-03 3:03 [Bug c++/57153] New: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct f.heckenbach@fh-soft.de 2013-05-06 12:09 ` [Bug c++/57153] " daniel.kruegler at googlemail dot com @ 2014-11-18 10:46 ` paolo.carlini at oracle dot com 2014-11-18 11:38 ` paolo.carlini at oracle dot com 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2014-11-18 10:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57153 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Known to work| |4.9.1, 5.0 Resolution|--- |FIXED --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> --- This is fixed in 4.9.1. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57153] [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct 2013-05-03 3:03 [Bug c++/57153] New: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct f.heckenbach@fh-soft.de 2013-05-06 12:09 ` [Bug c++/57153] " daniel.kruegler at googlemail dot com 2014-11-18 10:46 ` paolo.carlini at oracle dot com @ 2014-11-18 11:38 ` paolo.carlini at oracle dot com 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2014-11-18 11:38 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57153 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.9.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-18 11:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-03 3:03 [Bug c++/57153] New: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct f.heckenbach@fh-soft.de 2013-05-06 12:09 ` [Bug c++/57153] " daniel.kruegler at googlemail dot com 2014-11-18 10:46 ` paolo.carlini at oracle dot com 2014-11-18 11:38 ` 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).