On poniedziaÅek 22 listopad 2004 01:26 pm, Andre Poenitz wrote: > On Mon, Nov 22, 2004 at 12:33:23PM +0100, Lars Gullik BjÃnnes wrote: > > I am trying to make the inset hierarchy more immune to splicing and > > wrong usage. > > > > In mathed this construct is used > > > > *this = SomeClass(foo);
Maybe operator= should destroy whatever resources should be destroyed, etc. The code with explicit destructor call and placement new is more efficient of course, but less intuitive. Cheers, Kuba Ober