------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-23 03:47 ------- (In reply to comment #7) > --------------------------------------------------------------------- > template <typename> struct X { > enum { N = 10 }; > int items[N+1]; > }; > template <typename A, typename B> int operator+(A,B); > X<int> x; > ----------------------------------------------------------------------
Actually I think there is two different bugs here, the above code is vaild I think because operators just like functions have an overloaded set for lookup which is PR 2922. The testcase which is questionable is: template <typename A, typename B> int operator+(A,B); template <typename> struct X { enum a{ N = 10 }; int items[N+1]; }; X<int> x; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6273