if map.insert fails how check its failure without using bad_alloc
<p>If inside my code i am having a </p>

<pre><code>class A;
A ob;
pair&lt;map&lt;int,A&gt;::iterator,bool&gt; ret;
ret=map.insert(pair&lt;int,A&gt;(1,ob));
</code></pre>

<p>If map fails to insert the ob because of out of memory, it will throw bad_alloc
but is there any other way to check whether insert failed or not because i have a restriction to not use namespace and exception handling.
Can't we use some kind of NULL pointer comparision statement?</p>
