The assignment operator can be overloaded using a member function but not a non-member friend function:
class Test
{
int a;
public:
Test
operator= is a special member function that the compiler will provide if you don't declare it yourself. Because of this special status of operator= it makes sense ro require it to be a member function, so there is no possibility of there being both a compiler-generated member operator= and a user-declared friend operator= and no possibility of choosing between the two.