title: How std::function works
body: <p>You know, we can wrap or store a lambda function to a <code>std::function</code>:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;functional&gt;
  int main()
  {
      std::function&lt;float (float, float)&gt; add = [](float a, float b)
      //            ^^^^^^^^^^^^^^^^^^^^
      {
          return a + b;
      };
  
      std::cout &lt;&lt; add(1, 2) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>My question is around <code>std::function</code>, as you can see it is a template class but it can accept any kind of <strong>function signature</strong>.</p>
  
  <p>For example <code>float (float, float)</code> in this form <code>return_value (first_arg, second_arg)</code>.</p>
  
  <p>What's the structure of <code>std::function</code> and how does it accept a function signature like <code>x(y,z)</code> and how it works with it? Is <code>float (float, float)</code> a new valid expression in C++?</p>