This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/24161] [3.4/4.0/4.1 Regression] Lookup of template member function finds global type.



------- Comment #3 from mmitchel at gcc dot gnu dot org  2005-10-03 00:16 -------
Until DR228 the name following ".template" had to be a member template, so the
code would have been invalid on those grounds.

However, even after DR228, I don't think this is valid code.

The name lookup done after ".template" must include templates in the global
scope; DR 228 makes that clear.

EDG 3.6 rejects the program in its strict mode, as well, giving two messages:

"pr24161.cpp", line 7: error: name following "template" must be a member
          template
     t.template f< int >();
                ^

"pr24161.cpp", line 7: error: too few arguments for class template "f"
     t.template f< int >();
                       ^


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]