あれから考えていたのですが、Barton and Nackman Trickも捨てがたいです。
前方宣言も必要ないし。
多少面倒でも、>>244のようにすべきなのでしょうか。

template < int X >
class Foo
{
  //Barton and Nackman Trick
  friend std::ostream & operator << ( std::ostream & out, Foo<X> const & val )
  {
    val.print(out) ;
    return out ;
  }

//こっちは厳密に言うとBarton and Nackman Trickじゃないかもしれないけど、よりジェネリックに。
/*********
* template < typename CharType >
* friend std::basic_ostream<CharType> & operator << ( std::basic_ostream<CharType>, Foo<X> const & val) ;
* { val.print(out) ; return out ;}
*************************/

private :
  //実際の出力は、このメンバ関数が行う。
  void print( std::ostream & out ) const { out << "private!" ; };
} ;