Ban pointers or references on classes?
Is it possible to ban the use of references or pointers on specific classes?
Consider the following:
Is it possible to ban such usage by doing something with the class? If possible, I want it only to be passed by value.
void foo(pp<int>&) // pp = CMemoryManager
void foo(pp<int>*) // pp = CMemoryManager
ppnew<int> pTest; // Creates a new class of type CMemoryManager
foo(pTest); // I want to ban this, if possible.
foo(&pTest); // This too, maybe.