Is there a way to change the delete action on an existing instance of shared_ptr
<p>I have a function where I want a cleanup action done 90% of the time, but in 10% I want some other action to be done.</p>

<p>Is there some way to use some standard scoped control like<code>shared_ptr&lt;&gt;</code> so that initially it can have one delete action and then later in the function the delete action can be changed?</p>

<pre><code>shared_ptr&lt;T&gt; ptr( new T, std::mem_fun_ref(&amp;T::deleteMe) );
ptr.pn.d = std::mem_fun_ref(&amp;T::queueMe);
</code></pre>
