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++/11976] parse error accessing member function template out of class template


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>();
}


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