title: Placement new and non-default constructors
body: <p>Can I call the C++ placement new on constructors with parameters? I am implementing a custom allocator and want to avoid having to move functionality from non-default constructors into an init function.</p>
  
  <pre><code>class CFoo
  {
  public:
      int foo;
      CFoo()
      {
          foo = 0;
      }
  
      CFoo(int myFoo)
      {
          foo = myFoo;
      }
  };
  
  CFoo* foo = new (pChunkOfMemory) CFoo(42);
  </code></pre>
  
  <p>I would expect an object of type CFoo to be constructed at pChunkOfMemory using the second constructor. When using operator new am I stuck with default constructors only?</p>
  
  <p><strong>Solved! I did not <code>#include &lt;new&gt;</code>. After this, calling placement ::new worked fine with non-default constructors.</strong></p>