what is the basic use of aligned_storage?
<p>What is the basic usage of std::tr1::aligned_storage ? Can it be used as auto memory for a data type Foo like the one below?</p>

<pre><code>   struct Foo{...};
   std::tr1::aligned_storage&lt;sizeof(Foo)
     ,std::tr1::alignment_of&lt;Foo&gt;::value &gt;::type buf;
   Foo* f = new (reinterpret_cast&lt;void*&gt;(&amp;buf)) Foo();
   f-&gt;~Foo();
</code></pre>

<p>If so, what about storing multiple Foo in the buf like,</p>

<pre><code>    std::tr1::aligned_storage&lt;5*sizeof(Foo)
         ,std::tr1::alignment_of&lt;Foo&gt;::value &gt;::type buf;
    Foo* p = reinterpret_cast&lt;Foo*&gt;(&amp;buf);
    for(int i = 0; i!= 5; ++i,++p)
    {
     Foo* f = new (p) Foo();
    }
</code></pre>

<p>Are they valid programs? Is there any other use case for it ? 
Google search only yields the documentation about aligned_storage, but very little about the usage of it.</p>
