Is it possible to ban the use of references or pointers on specific classes?
Consider the following:
Code:
void foo(pp<int>&) // pp = CMemoryManager
{
}

void foo(pp<int>*) // pp = CMemoryManager
{
}

int main()
{
ppnew<int> pTest; // Creates a new class of type CMemoryManager
foo(pTest); // I want to ban this, if possible.
foo(&pTest); // This too, maybe.
}
Is it possible to ban such usage by doing something with the class? If possible, I want it only to be passed by value.