Originally Posted by Elysia So far, here's what I have: Code: ppnew<int>* pTest2 = new ppnew<int>; // Does not work - can't call private operator What about: Code: ppnew<int>* pTest1 = new(std::nothrow) ppnew<int>; ppnew<int>* pTest2 = new ppnew<int>[10]; char pTest3a[sizeof(ppnew<int>)]; ppnew<int>* pTest3b = new(pTest3a) ppnew<int>(); And other cases. If you're going to hide new, you need to hide all its forms.
ppnew<int>* pTest2 = new ppnew<int>; // Does not work - can't call private operator
ppnew<int>* pTest1 = new(std::nothrow) ppnew<int>; ppnew<int>* pTest2 = new ppnew<int>[10]; char pTest3a[sizeof(ppnew<int>)]; ppnew<int>* pTest3b = new(pTest3a) ppnew<int>();
It is too clear and so it is hard to see. A dunce once searched for fire with a lighted lantern. Had he known what fire was, He could have cooked his rice much sooner.