This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11711] New: Inheritance from partially specialized template does not work
- From: "furnish at lightspeed dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2003 19:12:01 -0000
- Subject: [Bug c++/11711] New: Inheritance from partially specialized template does not work
- 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=11711
Summary: Inheritance from partially specialized template does not
work
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: furnish at lightspeed dot com
CC: gcc-bugs at gcc dot gnu dot org
The following code will not compile under GCC 3.3, 3.3.1 (prerelease,
2003/07/20 snapshot), or 3.4 (cvs head as of 2003/07/29).
template<class H, class T> struct TL {};
template<class X> class Base;
template<class H, class T>
class Base< TL<H,T> >
{
public:
template<int I> void f() {}
};
template<class H, class T>
class Derived
: public Base< TL<H,T> >
{
public:
void g()
{
f<1>();
}
};
KCC 4.0f --strict compiles this code, which is some evidence that the code
is in fact legal. The problem seems to be that class Derived isn't actually
inheriting from the specialized Base variant, or at least, name lookup
is failing to find the (template) member function f().