struct->struct->class in C++ no constructor

Alexandre Oliva aoliva@redhat.com
Wed Jul 23 10:58:00 GMT 2008


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}



More information about the Gcc-help mailing list