title: In C++, does the scope of a named parameter include the expression for its default value?
body: <p>Example: Is this legal C++14?</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  
  static int d() {
      return 42;
  }
  
  static int e(int d = d()) {
      return d;
  }
  
  int main() {
      std::cout &lt;&lt; e() &lt;&lt; &quot; &quot; &lt;&lt; e(-1) &lt;&lt; std::endl;
  }
  </code></pre>
  <p>g++ 5.4 with <code>-std=c++14</code> likes it, but clang++ 3.8 with <code>-std=c++14</code> complains:</p>
  <pre class="lang-none prettyprint-override"><code>samename.cxx:3:23: error: called object type 'int' is not a function or function pointer
  static int e(int d = d()) {return d;}
                       ~^
  </code></pre>