title: Raw array of shared_ptr<X> where X doesn't seem to be initialised?
body: <p>I have a class:</p>
  
  <pre><code>class C{
  public:
  //Omitted
  
  private:
      shared_ptr&lt;X&gt; anArray[2];
  };
  </code></pre>
  
  <p>and <code>X</code> looks like:</p>
  
  <pre><code>class X{
  public:
      X(); //default constructor used by the above array declaration?
  private:
      std::unordered_map&lt;int, double&gt; a;
  };
  </code></pre>
  
  <p>After I create my <code>C</code> class, I access one of the two shared_ptr objects in the array, however, the memory doesn't seem to be initialised. By this I mean <code>X::a</code> doesn't have any valid state. </p>
  
  <p>I thought the array declaration in <code>C</code> would create the <code>shared_ptr&lt;X&gt;</code>s AND the <code>X</code> objects? </p>
  
  <p>Is there something I should be explicitly doing in the X default constructor?</p>