This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-1.1b: multiple template inheritance problem
- To: egcs-bugs at cygnus dot com
- Subject: egcs-1.1b: multiple template inheritance problem
- From: Chris Metcalf <metcalf at incert dot com>
- Date: Mon, 28 Sep 1998 13:38:21 -0400 (EDT)
The following program fails to compile under egcs-1.1b
(i386-pc-solaris2.6, i386-cygwin32):
template <class FOO> class BAR {
public:
void func1();
};
class BAZ : public BAR<int>, BAR<char*> { };
void func2(BAZ* b)
{
b->BAR<int>::func1();
}
The generated error text is
foo.cpp: In function `void func2(class BAZ *)':
foo.cpp:10: request for member `BAR' is ambiguous
foo.cpp:10: parse error before `>'
This compiles correctly under egcs 1.0.3 (and Visual C++).
Chris Metcalf -- InCert Software -- 1 (617) 621 8080
metcalf@incert.com -- http://www.incert.com/~metcalf