[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: kdevplatform krazy
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-07-19 12:30:49
Message-ID: 20070719123049.GC8255 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

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.

_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic