compiling error in copy constructor