title: C++ uninitialized shared_ptr is allowing functions to be called
body: <p>I have a shared pointer structure setup as such:</p>
  
  <p>Class.h</p>
  
  <pre><code>std::shared_ptr&lt;exampleClass&gt; mSharedPtr;
  </code></pre>
  
  <p>Class.cpp</p>
  
  <pre><code>// Why do either of these calls work before reset() has been called on the shared pointer?
  // Populates data from xml file
  mSharedPtr-&gt;initialize();
  bool returnValue = mSharedPtr-&gt;getBool();
  </code></pre>
  
  <p>Sidenote: When inspecting this variable in the VisualStudio debugger, the shared_ptr is null, as in pointing to nothing. I'm really confused as to why this isn't causing a crash. </p>