title: Get underlying type for a template used in decltype
body: <pre><code>#include &lt;atomic&gt;
  
  std::atomic&lt;int&gt; bar;
  
  auto foo() -&gt; decltype(bar)
  {
          return bar++;
  }
  </code></pre>
  
  <p>I receive this gcc error message:</p>
  
  <pre><code>error: use of deleted function ‘std::atomic&lt;int&gt;::atomic(const std::atomic&lt;int&gt;&amp;)’
  </code></pre>
  
  <p>Changing the type in <code>decltype()</code> to <code>int</code> works. To keep my code more general how can I get the type <code>int</code> as defined between the <code>&lt;&gt;</code>?</p>