This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]