title: Non-existing identifier used as default argument in non-instantiated function template
body: <p>Today I found a piece of code equivalent to the following:</p>
  
  <pre><code>enum X
  {
      x1 = 0,
      x2 = 1
  };
  
  template&lt;typename T&gt;
  void bar(T obj, X x = x3) { }
  //                    ^^
  //                    This identifier is bogus!
  
  int main() { }
  </code></pre>
  
  <p>Both VC10 and VC12 happily compile it. Both clang 3.4 and GCC 4.8.1 reject it (which is what I would expect). </p>
  
  <p>Is this a bug, or is VC's behavior actually allowed by the Standard? If so, which are the relevant paragraphs?</p>