public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48255] New: default constructor with argument INT
@ 2011-03-23 15:56 lisp2d at lisp2d dot net
2011-03-23 16:30 ` [Bug c++/48255] " rguenth at gcc dot gnu.org
2011-03-23 16:33 ` lisp2d at lisp2d dot net
0 siblings, 2 replies; 3+ messages in thread
From: lisp2d at lisp2d dot net @ 2011-03-23 15:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48255
Summary: default constructor with argument INT
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: lisp2d@lisp2d.net
class A{
public:
};
A x; // OK
A y(1); //OK
I can't found that standard says: default constructor with argument INT.
By code protection I will write:
class A{
A(); // w/o definition
A(int); // w/o definition
public:
};
What to do?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/48255] default constructor with argument INT
2011-03-23 15:56 [Bug c++/48255] New: default constructor with argument INT lisp2d at lisp2d dot net
@ 2011-03-23 16:30 ` rguenth at gcc dot gnu.org
2011-03-23 16:33 ` lisp2d at lisp2d dot net
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-23 16:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48255
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-23 15:55:36 UTC ---
t.C:5:6: error: no matching function for call to ‘A::A(int)’
t.C:1:8: note: candidates are: A::A()
t.C:1:8: note: A::A(const A&)
your code example is rejected as it should.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/48255] default constructor with argument INT
2011-03-23 15:56 [Bug c++/48255] New: default constructor with argument INT lisp2d at lisp2d dot net
2011-03-23 16:30 ` [Bug c++/48255] " rguenth at gcc dot gnu.org
@ 2011-03-23 16:33 ` lisp2d at lisp2d dot net
1 sibling, 0 replies; 3+ messages in thread
From: lisp2d at lisp2d dot net @ 2011-03-23 16:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48255
--- Comment #2 from Lisp2D <lisp2d at lisp2d dot net> 2011-03-23 16:15:14 UTC ---
found silent conversion
class A have
explicit A(std::complex<long double>const& x);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-23 16:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23 15:56 [Bug c++/48255] New: default constructor with argument INT lisp2d at lisp2d dot net
2011-03-23 16:30 ` [Bug c++/48255] " rguenth at gcc dot gnu.org
2011-03-23 16:33 ` lisp2d at lisp2d dot net
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).