title: Access C++14 lambda captures like struct members
body: <p>AFAIK, C++11/14 does not allow in-place definition of a new return type while defining a lambda. However, it seems a C++14 lambda capture expression essentially creates an anonymous type with one or more "members" and an operator (). So, why is that the compiler does not allow access to the captured members from <strong>outside</strong> the lambda. My feeble mind cannot handle the complexities of C++ but does it sound like a reasonable language extension to you? Here is an example.</p>
  
  <pre><code>vector&lt;string&gt; words = { "Stack", "Overflow" };
  auto l = [w = words](){}; // almost like a C# anonymous type
  cout &lt;&lt; l.w[0]; // does not work. 
  </code></pre>