An <code>vector</code> is a <ahref="../Random_Access_Sequence.html">Random Access Sequence</a> of types. It's also an <ahref="../Extensible_Sequence.html">Extensible Sequence</a> that supports constant time insertion and removal of elements at the end (through <code><ahref="../Reference/push_back.html">push_back</a></code>), and linear time insertion and removal of elements at the beginning or in the middle (through <code><ahref="../Reference/insert.html">insert</a></code>/<code><ahref="../Reference/erase.html">erase</a></code> algorithms). On compilers that support the typeof extension, vector is the simplest and in many cases the most efficient sequence [<ahref="#1">1</a>].
[<aname="1">1</a>] The <code>typeof</code> operator allows one to use overload resolution to implement a constant-time random access to elements of the sequence with minimum amount of code (in contrast to the usual brute-force approach the library has to resort to when the <code>typeof</code> operator is not available):
<p>
<pre>
struct null_node
{
static aux::type_wrapper<void_> item(...);
};
<p>
template< long N, typename T, typename Base >