This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: no matching function
- To: "Roger Collins" <roger at ProProject dot com>
- Subject: Re: no matching function
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 11 Feb 2001 14:55:51 -0200
- Cc: <gcc at gcc dot gnu dot org>
- Organization: GCC Team, Red Hat
- References: <NEBBJJFHGLJIMPFMHKBDGEJPCGAA.roger@ProProject.com>
On Feb 10, 2001, "Roger Collins" <roger@ProProject.com> wrote:
> The base class constructor gets called automatically. Does the language try
> to find one that matches the derived class constructor signature? Or does
> it just use the default constructor?
the latter.
> Anyway, this explains why there is a call (implied) to the default
> constructor of basic_iostream.
Yep
> If a default constructor isn't defined, doesn't it get created
> automatically?
Not if there are other constructors.
> Does a default basic_iostream make any sense?
It would be non-standard.
> Has it been explicitly defined private to prevent its use?
Nope. It's just that you must explicitly initialize the base class in
the constructors of the derived class, when the base class offers no
default constructor.
If you have further questions about the C++ language, please use a
more appropriate forum. This mailing list is about the development
of GCC, not about learning C++ with GCC.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me