How does a vector as a key works internally in C++? : <p>This SO answers says that <a href="https://stackoverflow.com/questions/8903737/stl-map-with-a-vector-for-the-key">STL Map with a Vector for the Key</a> the vector can be used as a key. So when we use a vector as a key. How does that actually work since the key needs to be unique so when we insert another vector with the same elements will the <code>map</code> check for duplicate element by element or the name of the vector does specify something? Like the name of the array represents the base address. So an array can be used as a key since the base address can be used as a key in this case but what is the key in case of a vector. How does it work internally.</p>

<p>Because when I print the name of the vector, I do get an error</p>

<pre><code>vector&lt;int&gt; v;
cout&lt;&lt;v; //error
</code></pre>
