title: Invalid application of 'sizeof' to incomplete type ( created classes)
body: <p>I have next classes:</p>
  
  <p>State.hpp</p>
  
  <pre><code>    ...
  
      class Engine;
  
      namespace window
      {
  
      class State
      { ... } }
  </code></pre>
  
  <p>WConsole.hpp</p>
  
  <pre><code>    ...
  
      class Engine;
  
      namespace window
      {
  
      class Console: public State
      { .. } }
  </code></pre>
  
  <p>WMesssage.hpp</p>
  
  <pre><code>    ...
  
      class Engine;
  
      namespace window
      {
  
      class Message: public State
      { ... } }
  </code></pre>
  
  <p>And all classes link to Engine class:</p>
  
  <p>Engine.hpp</p>
  
  <pre><code>    ...
  
      namespace window 
      {
      class State;
      class Console;
      class Message;
      }
  
      class Engine
      {
          ...
          std::vector&lt; std::unique_ptr&lt;window::State&gt; &gt; m_windowObjects;
          std::unique_ptr&lt;window::Console&gt; m_consoleWindow;
          std::unique_ptr&lt;window::Message&gt; m_messageWindow;
          ...
      }
  </code></pre>
  
  <p>And in Engine.cpp I include the headers:</p>
  
  <pre><code>    #include "Engine.hpp"
      #include "WState.hpp"
      #include "WConsole.hpp"
      #include "WMessage.hpp"
  </code></pre>
  
  <p>If I try to compile I get this errors:</p>
  
  <pre><code>In file included from /usr/include/c++/4.8.2/memory:81:0,
                   from /usr/local/include/SFGUI/Signal.hpp:6,
                   from /usr/local/include/SFGUI/Object.hpp:4,
                   from /usr/local/include/SFGUI/Widget.hpp:4,
                   from /usr/local/include/SFGUI/Container.hpp:4,
                   from /usr/local/include/SFGUI/Bin.hpp:4,
                   from /usr/local/include/SFGUI/SFGUI.hpp:6,
                   from ./include/Handler.hpp:4,
                   from main.cpp:1:
  /usr/include/c++/4.8.2/bits/unique_ptr.h: In instantiation of 'void std::default_delete&lt;_Tp&gt;::operator()(_Tp*) const [with _Tp = window::Console]':
  /usr/include/c++/4.8.2/bits/unique_ptr.h:184:16:   required from 'std::unique_ptr&lt;_Tp, _Dp&gt;::~unique_ptr() [with _Tp = window::Console; _Dp = std::default_delete&lt;window::Console&gt;]'
  ./include/Engine.hpp:21:7:   required from here
  /usr/include/c++/4.8.2/bits/unique_ptr.h:65:22: error: invalid application of 'sizeof' to incomplete type 'window::Console'
    static_assert(sizeof(_Tp)&gt;0,
                        ^
  /usr/include/c++/4.8.2/bits/unique_ptr.h: In instantiation of 'void std::default_delete&lt;_Tp&gt;::operator()(_Tp*) const [with _Tp = window::Message]':
  /usr/include/c++/4.8.2/bits/unique_ptr.h:184:16:   required from 'std::unique_ptr&lt;_Tp, _Dp&gt;::~unique_ptr() [with _Tp = window::Message; _Dp = std::default_delete&lt;window::Message&gt;]'
  ./include/Engine.hpp:21:7:   required from here
  /usr/include/c++/4.8.2/bits/unique_ptr.h:65:22: error: invalid application of 'sizeof' to incomplete type 'window::Message'
  </code></pre>
  
  <p>From what I see I don't get an error relating to window::State so mean that I introduced it in the right way, but why I get error relating to window::Console and window::Message?
  May affect that classes window::Console and window::Message are derivated from window::State?</p>