added self-assignment check in the copy assignment operator of vector