title: How do I save a lambda for later callback?
body: <p>How do I fix the code below to store a lambda so I can invoke it at a later time?  </p>
  
  <p>The error I currently get is <strong>field 'm_callback' has incomplete type</strong>.</p>
  
  <pre><code>class Foo
  {
      public:
          Foo()  { }
          ~Foo() { }
  
          template&lt; typename FuncT &gt; 
          void setCallback( FuncT&amp;&amp; callback )
          {
              m_callback = callback;
          }
  
      private:
          auto m_callback;   // this line is broken
  };
  </code></pre>
  
  
  
  <pre><code>int main(int argc, char** argv)
  {
      Foo foo;
  
      foo.setCallback( [] (int x){ return true; } );
  
      return 0;
  }
  </code></pre>