🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1906

Re: virtual base class construction

#1906
From: John Max Skaller
Date: Tue, 05 Sep 1995 05:04
40 lines
1575 bytes
kanze@gabi-soft.fr (J. Kanze) wrote:

>John Max Skaller (maxtal@Physics.usyd.edu.au) wrote:
>|> In article <40g1nl$2jo@gabi.gabi-soft.fr>, J. Kanze <kanze@gabi-soft.fr> wrote:
>|> >John Max Skaller (maxtal@Physics.usyd.edu.au) wrote:

>|> >|> 	For example how do you do assignments in the presence of
>|> >|> virtual bases? What stops the data of the virtual base being assigned
>|> >|> more than once?

>|> >	C&
>|> >	C::operator( C const& other )
>|> >	{
>|> >		if ( this != &other )
>|> >		{
>|> >			this->~C() ;
>|> >			new ( this ) C( other ) ;
>|> >		}
>|> >		return *this ;
>|> >	}
>|> >
>|> >No duplicate assignment of the virtual bases of C.
>
>|> I don't understand, this does NOT work.
>
>Yes it does.  

    Sorry! you're right! It works.








---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <MATT.95Sep04210421@Austern>
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
References: <648258751wnr@hi-q.demon.co.uk> <3up5ne$4gv@fsgm01.fnal.gov> <401gnk$mk0@metro.ucc.su.OZ.AU> <40g1nl$2jo@gabi.gabi-soft.fr> <40nvlf$al@metro.ucc.su.OZ.AU> <MATT.95Aug29110526@physics10.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
From: John Max Skaller <maxtal@suphys.physics.su.oz.au>
Newsgroups: comp.std.c++
Subject: Re: virtual base class construction
Date: 05 Sep 1995 05:04:21 GMT
Organization: MAXTAL
Approved: Matt@Austern
Message-ID: <MATT.95Sep04210421@Austern>
References: <648258751wnr@hi-q.demon.co.uk> <3up5ne$4gv@fsgm01.fnal.gov> <401gnk$mk0@metro.ucc.su.OZ.AU> <40g1nl$2jo@gabi.gabi-soft.fr> <40nvlf$al@metro.ucc.su.OZ.AU> <MATT.95Aug29110526@physics10.Berkeley.EDU>
NNTP-Posting-Host: austern.hip.berkeley.edu