I want to publicly hide the copy constructor and the assignment operator.
Furthermore i want to provide a clone()
.
Is it possible to just mark the copy constructor and the assignment operator as protected
or private
and use them in the clone function?
Maybe some kind of using clause.
The reason is that the class contains some data and a unique id that should be incremented with every instance. So making a copy would be using the default assignment operator and then change the id. I would like to circumvent the need to copy every member by hand to avoid forgetting to add one if a member was added to class.