kdevplatform krazy

Andreas Pakulat apaku at gmx.de
Thu Jul 19 12:30:49 UTC 2007


On 19.07.07 08:08:38, Kris Wong wrote:
> > > I am a bit worried about
> > > IdentifiedFile* IdentifiedFile::operator=( const 
> > IdentifiedFile& rhs ) {
> > > because I dont know if it should be
> > > IdentifiedFile& IdentifiedFile::operator=( const 
> > IdentifiedFile& rhs ) {
> > 
> > It should return a reference I think.
> > 
> 
> Really it doesn't need to return anything.  I usually declare my
> operator= with a void return type.

Well, then you can't do

foo = bar = 10;

Of course I have no idea if thats needed or wanted for IdentifiedFile,
but it seems to be common practive to return a reference to this from
operator=.

Andreas

-- 
Don't relax!  It's only your tension that's holding you together.




More information about the KDevelop-devel mailing list