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++/11711] New: Inheritance from partially specialized template does not work


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().


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