how to test whether auto pointer is null?
<p>I'm new to auto pointer. I have this:</p>

<pre><code>std::auto_ptr&lt;myClass&gt; myPointer(new MyClass(someArg));
</code></pre>

<p>How do I test whether I can instantiate <code>myPointer</code> successfully? I tried <code>if (myPointer==NULL)</code> and the compiler emitted an error:</p>

<blockquote>
  <p>no operator "==" matches these operands.</p>
</blockquote>
