2008/7/21 Wesley Smith <wesley.hoke@xxxxxxxxx>: > Hi, > I've encountered a problem in GCC 4.2.3 that didn't exist in GCC > 4.0.x. Let's say I have: > > template<class T> > Tube{ > public: > Tube(); > ~Tube(); > }; > > struct Graph { > Tube<Ugen> t; > } > > struct Clock { > Graph g; > } > > At issue is that Tube<T>'s constructor isn't getting called when Clock > is allocated on the stack. Is this compliant with the C++ standard? > I thought all classes had their constructors called when instantiated > as an object even as members of structs. Any ideas? Can you give a complete program which shows your problem? Chris