title: How to delay initialization of a member variable
body: <p>I have a java class defined like so:</p>
  
  <pre><code>class GlslProgram
  {
  public:
      class Format {
      public:
          Format&amp; vertex(const char* shader_path);
          std::string m_vertex_shader;
  
      private:
          std::string load_shader(const char* shader_path);
      };
  
      void use() const;
      void uniform(const GLchar* name, const GLboolean value) const;
  
  
      GlslProgram() {};
      GlslProgram(const Format&amp; format, const bool separable = false);
  
  private:
      GLuint m_handle;
      GLuint compile_shader(const std::string shader_string, const GLenum 
  };
  </code></pre>
  
  <p>The second constructor (i.e. <code>GlslProgram(const Format&amp; format, const bool separable = false);</code> is the only one I want to use or have be available.</p>
  
  <p>I want to delete the default constructor (or make it private) however I can't because I have to declare (uninitialized) instances of <code>GlslProgram</code> as members of another class in my application.</p>
  
  <p>i.e.</p>
  
  <pre><code>class BasicCubeExample : public Application
  {
  private:
      virtual void set_info()
      {
          Application::set_info();    
          m_info.title = "Basic cube example";
      }
      // Here the format is not yet known so I can not call the correct constructor (at this time)
      GlslProgram m_shader;
  };
  </code></pre>
  
  <p>So, by declaring <code>GlslProgram m_shader;</code> I call both the default constructor of <code>GlslProgram</code> (which I do not want to do) and I have to keep the default constructor available (which I do no want to do).</p>
  
  <p>How can I declare an instance of a class as a member variable without calling its default constructor?</p>