------- Comment #4 from redi at gcc dot gnu dot org 2005-10-03 16:54 ------- > Until DR228 the name following ".template" had to be a member template, so the > code would have been invalid on those grounds.
Erm, the name following .template *is* a member template, that's my whole point! :-) I don't understand why DR228 applies, that is about whether non-member templates can follow the .template syntax, not about whether 3.4.5 para 2 applies to templates. Additionally, I believe the apparently correct behaviour that resulted in my bug report makes the use of "template" even harder to teach - something that was apparently a motivation for DR228. It also means that the template function "f" is dependent on include ordering and whether a global "f" has been declared. However, I'll take the question to a more appropriate forum and try to get an explanation there, rather than banging on about it here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161