how to check if a std::map insert fails in c++?
<p>I have a custom data structure <code>Class Client</code> and <code>ClientList</code>.</p>

<p>In ClientList I do</p>

<pre><code>map&lt;ULONG, Client*&gt; list;
</code></pre>

<p>and then I add elements by </p>

<pre><code>void ClientList::add(Client *client) {
list.insert(std::pair&lt;ULONG,Client*&gt;(client-&gt;getID(),client));
}
</code></pre>

<p>how to check if <code>insert</code> fails?</p>
