Hi

I am thinking about the assignment operator...
Basically if I want to overload it I code something like this :
Code:
 
class test{
public:
const test& operator=( const test& src ) { return *this; };
};
now the reason i return a const ref, is that i don't allow the user to do non-sence thing like the following :
Code:
 
test a, b, c;
(a = b) = c;
i just ommited the self assignment checking , cuz i wanna talk about the returned ref only in this thread....

which style do you use ? this :
Code:
test& operator=( const test& src )
or
Code:
const test& operator=( const test& src )

I know that with non-const returned ref we could code somthing like this :
Code:
 
void func( test& obj ){};
.
.
.
func( a = b );
is this a good style ?