title: lambdas require capturing 'this' to call static member function?
body: <p>For the following code:</p>
  
  <pre><code>struct B
  {
      void g()
      {
          []() { B::f(); }();
      }
  
      static void f();
  };
  </code></pre>
  
  <p>g++ 4.6 gives the error:</p>
  
  <blockquote>
    <p>test.cpp: In lambda function:<br>
     test.cpp:44:21: error: 'this' was not captured for this lambda function</p>
  </blockquote>
  
  <p>(Interestingly, g++ 4.5 compiles the code fine).</p>
  
  <p>Is this a bug in g++ 4.6, or is it really necessary to capture the 'this' parameter to be able to call a static member function? I don't see why it should be, I even qualified the call with <code>B::</code>.</p>