title: Is it wrong to dereference a pointer to get a reference?
body: <p>I'd much prefer to use references everywhere but the moment you use an STL container you have to use pointers unless you <em>really</em> want to pass complex types by value. And I feel dirty converting back to a reference, it just seems wrong.</p>
  
  <p>Is it?</p>
  
  <p>To clarify...</p>
  
  <pre><code>MyType *pObj = ...
  MyType &amp;obj = *pObj;
  </code></pre>
  
  <p>Isn't this 'dirty', since you can (even if only in theory since you'd check it first) dereference a NULL pointer?</p>
  
  <p>EDIT: Oh, and you don't know if the objects were dynamically created or not.</p>