Is it necessary to overload placement new operator, when we overload new operator?
<p>I have below piece of code</p>

<pre><code>class Test 
{
public:
    Test(){}
    Test(int i) {}

  void* operator new (size_t size)
  {
      void *p = malloc(size);
      return p;
  }
  //void* operator new (size_t size, Test *p)
  //{
     // return p;
  //}
};

int main() { 
   Test *p = new Test;
   int i = 10;
   new(p) Test(i);
}
</code></pre>

<p>Above piece of code does not compile in visual studio, unless i uncomment out the overloaded placement new operator function.
If i comment out normal overloaded new, in that case also it works fine.
Is overloading of placement new mandatory when overloading normal new operator(If placement new need to be used for that class)</p>

<p>Placement delete related code is not shown here.</p>
