クラステンプレート内でのフレンド関数定義

ここを見て、日記を書いていられる方を見かけたのでちょっとだけ解説。
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19809で示されているサンプル

#include 
template
struct n{
  friend void foo(){
    std::cerr << i << std::endl;;
  }
};

int main(){
  n<1> n1;
  n<2> n2;
  n<3> n3;
  foo();
}

Reporterの方は、規格の14.5.3 p3を引用されていますが、この引用元は、おそらく標準発行前の草案だと思われます。
正式に発行された規格では、該当部分は14.5.3 p5で、

When a function is defined in a friend function declaration in a class template, the function is defined at
each instantiation of the class template. The function is defined even if it is never used.

となっており、n<1>,n<2>,n<3>の宣言ごとにfoo()が定義され、多重定義エラーになるのが、正しい解釈と思われます。