http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45964
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-11 14:08:37 UTC --- (In reply to comment #7) > Ok and how is the case with the first template keyword, which Comeau says is > incorrect and gcc accepts it? > > const int A< a>::B<b>::template value = A<a>::B<b>::C::value; > ^^^^^^^^ > > In my eyes it seems to be the same issue as the second one? How is it there? > Which compiler is right? Hmm, yes _that_ might be a bug in G++, because of the statement in 14.2p5 which I quoted in comment 2. That can be reduced to: template<int a> struct A { static const int value; }; template<int a> const int A< a>::template value = 0;