This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11976] parse error accessing member function template out of class template
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2003 11:47:23 -0000
- Subject: [Bug c++/11976] parse error accessing member function template out of class template
- References: <20030819075711.11976.jbeulich@novell.com>
- 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=11976
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |rejects-valid
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-19 11:47 -------
Already fixed on the mainline and this was a known problem with GCC 2.95.3 to (not
including) 3.4.
The workaround is to use template:
class c1 {
public:
template<typename T> T test();
};
template<typename T> class c2 {
public:
void test(c1&rc1) {
rc1.template test<int>();
}
void test();
};
template<typename T> void c2<T>::test() {
c1 ic1;
ic1.template test<int>();
}