Performs a replacement operation on the sequence. The algorithm returns a new sequence which contains all the elements from <code>[begin<Sequence>::type, end<Sequence>::type)</code> range where every type identical to <code>OldType</code> has been replaced with a <code>NewType</code>. The result sequence preserves all the functional and performance characteristics of the original <code>Sequence</code>, including its size, but not identity.
<tr><td><code>Sequence</code></td><td>A model of <ahref="../Extensible_Sequence.html">Extensible Sequence</a></td><td>The original sequence. </td></tr>
<tr><td><code>OldType</code></td><td>A type</td><td>A type to be replaced. </td></tr>
<tr><td><code>NewType</code></td><td>A type</td><td>A type to replace with. </td></tr>
<tr><td><code>typedef replace<Sequence,OldType,NewType>::type s;</code></td><td>A model of <ahref="../Extensible_Sequence.html">Extensible Sequence</a></td><td></td><td>Equivalent to <code>typedef replace_if< Sequence,NewType,is_same<_,OldType>>::type t;</code>.</td><td></td></tr>
</table>
<p>
<h3>Complexity</h3>
<p>
Linear. Performs exactly <code><ahref="../Reference/size.html">size</a><Sequence>::type::value</code> comparisons for equality, and at most <code><ahref="../Reference/size.html">size</a><Sequence>::type::value</code> insertions.