title: Static object of nested class
body: <p>I have a <code>Request_manager.h</code> file declaring an object <code>Tickets_Queue</code> as static in <code>Request_manager</code>, which is a nested class from itself.</p>
  <pre><code>class Request_manager {
  public:
      class Tickets_Queue{
      private:
          pthread_mutex_t m_mutex;
  
      public:
          Tickets_Queue(){};
          ~Tickets_Queue(){};
      };
      static Tickets_Queue ticket_queue;
  
  private:
      static int m_connected;
  };
  </code></pre>
  <p>To initialize it, in <code>Request_manager.cpp</code> I write:</p>
  <pre><code>int Request_manager::m_connected(0);
  Request_manager::Tickets_Queue Request_manager::ticket_queue();
  </code></pre>
  <p>The initialization of <code>m_connected</code> works but for <code>ticket_queue</code> it says:</p>
  <pre><code>gcc.archive core/bin/gcc-5.4.0/debug/link-static/threading-multi/libcore.a
  gcc.compile.c++ data_interfaces/bin/gcc-5.4.0/debug/link-static/threading-multi/Request_manager.o
  data_interfaces/Request_manager.cpp:17:62: error: no ‘dataserver::Request_manager::Tickets_Queue dataserver::Request_manager::ticket_queue()’ member function declared in class ‘dataserver::Request_manager’
   Request_manager::Tickets_Queue Request_manager::ticket_queue();
  </code></pre>