title: error:template declaration of auto function
body: <p>While defining the following lambda function</p>
  
  <pre><code>// file prog.hpp
  template&lt;typename T&gt;
  auto function = [](T&amp; v){ return (v+= 2); }
  </code></pre>
  
  <p>I get the error:
  error:template declaration of auto function</p>
  
  <p>Please tell the correction that I should do</p>
  
  <p>I am using g++-4.6.1 -std=c++0x -c prog.hpp</p>