title: Declaration of std::vector works with forward declared classes?
body: <p>I have a header file like the below -</p>
  <pre><code>// abc.hpp
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  namespace A 
  {
      namespace B 
      {   
          struct abc 
          {   
              std::string _type;
          };  
  
          using abc_vector = std::vector&lt;abc&gt;;
      }   
  
  }
  </code></pre>
  <p>I am using forward declaration in another header file.</p>
  <pre><code>// con.hpp
  #include &lt;vector&gt;
  
  namespace A 
  {
      namespace B 
      {   
          struct abc; // Forward Declaration
          using abc_vector = std::vector&lt;abc&gt;;
      }   
  
      namespace C
      {   
          class N
          {   
              public:
                  B::abc_vector foo(std::string type);
          };  
      }   
  }
  </code></pre>
  <p>What really confuses me is that my code compiles and works.</p>
  <p>How is the vector allowed to be declared with incomplete type?
  I think that it shouldn't be able to decide the <strong>size of abc</strong>.</p>
  <pre><code>using abc_vector = std::vector&lt;abc&gt;;
  </code></pre>
  <p>The below is the code I used to test my header files.
  Strange enough, that it compiles and works all fine.</p>
  <pre><code>#include &quot;con.hpp&quot;
  #include &quot;abc.hpp&quot;
  
  #include &lt;iostream&gt;
  
  namespace A
  {
      namespace C
      {   
          B::abc_vector N::foo(std::string type)
          {   
              B::abc a;
              a._type = type;
  
              B::abc_vector d;
              d.push_back(a);
              return d;
          }   
      }   
  }
  
  int main()
  {
      A::C::N n;
      auto container = n.foo(&quot;test&quot;);
  
      for (const auto&amp; i : container)
            std::cout &lt;&lt; i._type &lt;&lt; ' ';
  
      return 0;
  }
  </code></pre>