In short: is it possible to somehow change the class definition so that it cannot be compiled to the point of use of the copy constructor, regardless of where it was used?
I have a very large project and I am clearing some class definitions. There is a class in which I clearly do not want to use copy constructors (let it ignore why this happens for the sake of this discussion), and in the interest of security, I decided that I would simply define the copy constructor as private, and not actually implement it ... like that this way it will throw a compilation error if I try to use it anywhere. Lo and behold, it compiles fine, but I have a linker error ... implementation of copy constructor not found! Presumably, this means that it is used somewhere, but I cannot find where it is used. By the way, this is Visual Studio 2010. So my question is, can I somehow change the class definition so that it does not compile at the point of use?
class Sample { private:
Presumably since I do not find a compilation error, but I click on the linker error, which means that the class (or friend) itself is doing the copy-built creation (since everything that will have access to the private constructor), but I'm sure that I can not find him!
source share