public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/58399] New: explicit constructor called implicitly with empty init-list @ 2013-09-12 3:04 f.heckenbach@fh-soft.de 2013-09-12 8:39 ` [Bug c++/58399] " redi at gcc dot gnu.org 2013-09-12 8:44 ` redi at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: f.heckenbach@fh-soft.de @ 2013-09-12 3:04 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58399 Bug ID: 58399 Summary: explicit constructor called implicitly with empty init-list Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenbach@fh-soft.de I think the following test should not compile, where an a object is implicitly constructed when calling foo() using its explicit constructor. struct a { explicit a () { } }; void foo (a) { } int main () { foo ({ }); } ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/58399] explicit constructor called implicitly with empty init-list 2013-09-12 3:04 [Bug c++/58399] New: explicit constructor called implicitly with empty init-list f.heckenbach@fh-soft.de @ 2013-09-12 8:39 ` redi at gcc dot gnu.org 2013-09-12 8:44 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: redi at gcc dot gnu.org @ 2013-09-12 8:39 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58399 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think this is a dup of PR 54835 which is fixed on trunk. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/58399] explicit constructor called implicitly with empty init-list 2013-09-12 3:04 [Bug c++/58399] New: explicit constructor called implicitly with empty init-list f.heckenbach@fh-soft.de 2013-09-12 8:39 ` [Bug c++/58399] " redi at gcc dot gnu.org @ 2013-09-12 8:44 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: redi at gcc dot gnu.org @ 2013-09-12 8:44 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58399 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- t.cc: In function 'int main()': t.cc:12:11: error: converting to 'a' from initializer list would use explicit constructor 'a::a()' foo ({ }); ^ *** This bug has been marked as a duplicate of bug 54835 *** ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-12 8:44 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-09-12 3:04 [Bug c++/58399] New: explicit constructor called implicitly with empty init-list f.heckenbach@fh-soft.de 2013-09-12 8:39 ` [Bug c++/58399] " redi at gcc dot gnu.org 2013-09-12 8:44 ` 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).