This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: struct->struct->class in C++ no constructor
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Wesley Smith" <wesley dot hoke at gmail dot com>
- Cc: GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 23 Jul 2008 07:13:42 -0300
- Subject: Re: struct->struct->class in C++ no constructor
- References: <1079b050807211401m71bd33a0hb1f91a8d0645d9ad@mail.gmail.com>
On Jul 21, 2008, "Wesley Smith" <wesley.hoke@gmail.com> wrote:
> At issue is that Tube<T>'s constructor isn't getting called when Clock
> is allocated on the stack.
Two thoughts:
- copy constructor being called instead
- syntax that declares a function returning a Clock, rather than an
object of type Clock
Without the definition, it's hard to give any definitive answer.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}