Look at the copy assignment operator (`Test& Test::operator=(const Test&);`). What does that look like? Please put that into the question too.
– Ted LyngmoJan 06 '22 at 01:19
Unrelated: there are often advantages to implementing the other way around with the assignment operator based on the copy constructor. See [What is the copy-and-swap idiom?](https://stackoverflow.com/questions/3279543) for a detailed discussion.
– user4581301Jan 06 '22 at 01:32