When is it useful to have custom construct/destroy methods in allocators?
<p>Custom allocators, and specifically the ability to customise the <code>allocate/deallocate</code> methods are very useful - allowing for control over the low-level memory allocation strategies used in certain performance critical areas. <a href="http://drdobbs.com/cpp/184406243" rel="nofollow">Pooled allocators</a> for node-based containers, and <a href="http://home.roadrunner.com/~hinnant/stack_alloc.html" rel="nofollow">fixed-size allocators</a> are a few examples that come to mind.</p>

<p>But when is it useful to define custom <code>construct/destroy</code> methods?</p>

<p>As I understand it, the standard mandates that these methods have the same effect as placement <code>new</code> and explicit destruction, i.e:</p>

<pre><code>//construct should give the same effect as:
    construct (_Type *_ptr, _Type const&amp;_val)
    {
        new(_ptr) _Type(_val);
    }
//destroy should give the same effect as:
    destroy (_Type *_ptr)
    {
        _ptr-&gt;~_Type();
    }
</code></pre>

<p>Is there any way to implement these methods in another way - not using placement <code>new</code> and explicit destruction? If not, why are they part of the allocator object? Wouldn't it be easier if everyone just used placement <code>new</code> and explicit destruction directly?</p>
