title: templated placement new and destructor
body: <p>why that does not compile?</p>
  
  <pre><code>template &lt;typename T&gt;
  class Pool{
  
      char Buff[sizeof(T)*256];
  
  public:
  
      Pool(){
          T* item = reinterpret_cast&lt;T*&gt;(&amp;Buff[0]);
          for(int i =0 ; i&lt;256;i++)
              item[i] = new(&amp;item[i]) T();
      }
  
      ~Pool(){
          T* item = reinterpret_cast&lt;T*&gt;(&amp;Buff[0]);
          for(int i =0 ; i&lt;256;i++)
              item[i] -&gt; ~ T();   
      }
  
      void reset(unsigned int i){
          T* item = reinterpret_cast&lt;T*&gt;(&amp;Buff[0]);
          item[i]-&gt;~T();
          item[i]-&gt;T();
      }
  }
  </code></pre>
  
  <p>What i obviously want to achieve is calling placement new on a raw memory array (that should call constructor ok). Then I want to call destructor and constructor of items in the array. The problem is that Item is template and so if I use</p>
  
  <pre><code>Pool&lt;FooBar&gt;
  </code></pre>
  
  <p>the compiler expect to find "FooBar()" and "~FooBar()" instead of "T()" and "~T()".
  is there any particular syntax to do that?</p>
  
  <p>I'm using <strong>C++03</strong> not C++11</p>