In addition to disabling the copy constructor and copy assignment operator of the type stored inside the vector, you cannot disable vector copies without changing the source code.
However, you have several options.
You can check if the vector copy constructor is present in your binary format; the optimizer should eliminate it if it is never used.
You can process the copy constructor of the type contained within the vector and see how often it is called.
You can put a breakpoint in the copy constructor (or one of the helper functions that it calls, and check the call stack on hit to see if it called the copy constructor).
Or you can temporarily wrap a vector with your own class and remove its copy constructor.
Ben voigt
source share