title: How to avoid warning when using scope guard?
body: <p>I am using folly  scope guard, it is working, but it generates a warning saying that the variable is unused:</p>
  
  <pre><code>warning: unused variable ‘g’ [-Wunused-variable]
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>folly::ScopeGuard g = folly::makeGuard([&amp;] {close(sock);});
  </code></pre>
  
  <p>How to avoid such warning?</p>