title: c++11 decltype(e) is the type of the entity named by e
body: <p><br>
  I am not asking <code>decltype((x))</code>, I know how it works.<br>
  <br>
  According to the draft N4687, § 10.1.7.2<br></p>
  
  <pre><code>    4 For an expression e, the type denoted by decltype(e) is defined as follows:
          ...
  (4.2)   — otherwise, if e is an unparenthesized id-expression or an unparenthesized class
            member access (8.2.5), decltype(e) is the type of the entity named by e. If
            there is no such entity, or if e names a set of overloaded functions, the
            program is ill-formed;
          ...
  </code></pre>
  
  <p>And example<br></p>
  
  <pre><code>struct A { double x; };
  const A* a = new A();
  decltype(a-&gt;x) x3; // type is double
  </code></pre>
  
  <p>My question is,<br>
  <code>a-&gt;x</code> is <code>const double</code>, but why does x3 is <code>double</code>? where does the <code>const</code> go?<br>
  BTW, what is <code>decltype(e) is the type of the entity named by e</code> meaning exactly?</p>