title: Using decltype to get an expression's type, without the const
body: <p>Consider the following program:</p>
  
  <pre><code>int main ()
  {
      const int e = 10;
  
      for (decltype(e) i{0}; i &lt; e; ++i) {
          // do something
      }
  }
  </code></pre>
  
  <p>This fails to compile with clang (as well as gcc):</p>
  
  <pre><code>decltype.cpp:5:35: error: read-only variable is not assignable
      for (decltype(e) i{0}; i &lt; e; ++i) {
                                    ^ ~
  </code></pre>
  
  <p>Basically, the compiler is assuming that <code>i</code> must be const, since <code>e</code> is.</p>
  
  <p>Is there a way I can use <code>decltype</code> to get the type of <code>e</code>, but removing the <code>const</code> specifier?</p>