This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11814] Code with missing "template" keyword wrongly accepted
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Aug 2003 23:34:17 -0000
- Subject: [Bug c++/11814] Code with missing "template" keyword wrongly accepted
- References: <20030805230939.11814.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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>();"
}
};