title: std::bind to std::function?
body: <p>I get a compile error using this:</p>
  
  <pre><code>std::vector&lt;std::function&lt;int(int)&gt;&gt; functions;
  
  std::function&lt;int(int, int)&gt; foo = [](int a, int b){ return a + b; };
  std::function&lt;int(int)&gt; bar = std::bind(foo, 2);
  
  functions.push_back(bar);
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>/usr/include/c++/4.6/functional:1764:40: error: no match for call to '(std::_Bind(int)>) (int)'</p>
  </blockquote>
  
  <p>Can someone tell me how to convert a <code>std::bind</code> into a <code>std::function</code>?</p>