http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45964
--- Comment #2 from Michael Schulze <mschulze at ivs dot cs.ovgu.de> 2010-10-11 11:27:14 UTC --- (In reply to comment #1) > (In reply to comment #0) > > template<int a> > > template<int b> > > const int A< a>::B<b>::template value = A<a>::B<b>::C::value; > ^^^^^^^^ > Are you sure the 'template' keyword belongs here? > GCC accepts it, but Comeau doesn't. > value is not a member template specialization, it is a member of a template. > The standard specifically says "the keyword template may not be applied to > non-template members of class templates" > > As for the main point of your report, I don't think 'template' is required, > because B<b> is not a member template specialization Yes you are right. This template may not be applied, however, that was not the template keyword that I meant. It seems there is another bug within the parser, isn't it. Okey, the template keyword that I meant was const int A< a>::B<b>::value = A<a>::template B<b>::C::value; ^^^^^^^^ I think this one is required. Older compilers require it, and on newer compilers it seems to be optional. IMO this is not optional because "C" depends on the "b" template paramter.