 <pre><code>decltype(a-&gt;x) </code></pre> <p>This gives you the type of the member variable <code>A::x</code>, which is <code>double</code>.</p> <pre><code>decltype((a-&gt;x)) </code></pre> <p>This gives you the type of the expression <code>(a-&gt;x)</code>, which is an lvalue expression (hence why it is a const reference--<code>a</code> is a <code>const A*</code>).</p>