The assignment operator can be overloaded using a member function but not a non-member friend function:
class Test
{
int a;
public:
Test
Because there is already an implicit operator overloading function for '=' in the class to do shallow copying. So even if you overload using a a friend function you will never be able to call it as any call made by us would call the implicit shallow copying method rather than the overloaded friend function.