[Bug c++/11814] Code with missing "template" keyword wrongly accepted

pinskia at physics dot uc dot edu gcc-bugzilla@gcc.gnu.org
Tue Aug 5 23:34:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-05 23:34 -------
I can confirm this on the mainline (20030805).
Here is a more interesting example where the two template function foo take two different 
template arguments:
template <typename> struct A
{
    template <int> void foo();
};
template <typename T> struct B
{
    template <int> void foo()
    {
        A<T>* p;
        p->foo<1>(); // wrong: should be "p->template foo<1>();"  
    }
};



More information about the Gcc-bugs mailing list