title: C++0x error : variable 'std::packaged_task<int> pt1' has initializer but incomplete type
body: <p>Below is a simple program in c++0x that makes use of packaged_task and futures. while compiling the program i get error : variable 'std::packaged_task pt1' has initializer but incomplete type</p>
  
  <p>the program is below </p>
  
  <pre><code>#include &lt;future&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  
  int printFn()
  {
  
      for(int i = 0; i &lt; 100; i++) 
      {
  
          cout &lt;&lt; "thread " &lt;&lt;  i &lt;&lt; endl;
      }
  return 1;
  }
  
  
  
  int main()
  {
  
     packaged_task&lt;int&gt; pt1(&amp;printFn);
  
     future&lt;int&gt; fut =  pt1.get_future();
  
     thread t(move(pt1));
  
     t.detach();
  
     int value  = fut.get();
  
     return 0;
  }
  </code></pre>