title: friend function template with default template argument
body: <p>Is it allowed to provide a default to a template argument in a friend declaration?</p>
  
  <pre><code>class A {
      int value;
  public:
      template&lt;class T = int&gt; friend void foo();
  };
  </code></pre>
  
  <p>Visual Studio 2015 seems to allow it.  gcc refuses it.  I couldn't find anything on it on the <a href="http://en.cppreference.com/w/cpp/language/friend" rel="nofollow">cppreference</a> page.</p>