title: In a lambda, does a by-value capture of a reference copy the underlying object?
body: <p>If a variable of reference type is captured in a lambda by value, is the referenced object copied or is it captured by reference?</p>
  <p>Small sample with question:</p>
  <pre><code>#include &lt;iostream&gt;
  
  struct Test {
    int a;
  };
  
  void testFunc(const Test &amp;test) {
    auto a = [=] {
      // is 'test' passed to closure object as a copy
      // or as a reference?
      return test.a;
    } ();
    std::cout &lt;&lt; a;
  }
  
  int main() {
    Test test{1};
    testFunc(test);
  }
  </code></pre>