title: Unevaluated operands and auto return type
body: <p>According with <a href="http://eel.is/c++draft/expr#8" rel="noreferrer">[5/8]</a> and <a href="http://eel.is/c++draft/dcl.dcl#dcl.type.simple-4" rel="noreferrer">[7.1.7.2/4]</a> (working draft):</p>
  
  <ul>
  <li>The operand of the <code>decltype</code> specifier is an <em>unevaluated operand</em></li>
  <li>An <em>unevaluated operand</em> is not evaluated</li>
  </ul>
  
  <p>Consider the code below:</p>
  
  <pre><code>#include&lt;type_traits&gt;
  
  struct S { using type = int; };
  
  int f(int i);
  
  template&lt;typename T&gt;
  typename T::type g(T);
  
  template&lt;typename T&gt;
  auto h(T v) { return v; }
  
  int main() {
      static_assert(std::is_same&lt;decltype(f(42)), int&gt;::value, "!");
      static_assert(std::is_same&lt;decltype(g(S{})), int&gt;::value, "!");
      static_assert(std::is_same&lt;decltype(h(42)), int&gt;::value, "!");
  }
  </code></pre>
  
  <p>It goes without saying that <code>f</code> and <code>g</code> are not evaluated actually.<br>
  On the other side, the function <code>h</code> has an <code>auto</code> return type that is deduced from its body, thus from its arguments and thus from the deduced type <code>T</code>.</p>
  
  <p>Can it still be considered an <em>unevaluated operand</em> in this case?<br>
  I mean, it seems to me that, in the context of the <code>decltype</code>, the function <code>h</code> <em>must</em> be evaluated to know what the actual return type is.</p>
  
  <p>For I'm quite sure that the working draft is right, the question is: what's wrong in my reasoning?</p>