[Bug c++/51889] New: [4.7 regression] can't override a using-declaration in a template

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 18 05:43:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51889

             Bug #: 51889
           Summary: [4.7 regression] can't override a using-declaration in
                    a template
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org
                CC: fabien@gcc.gnu.org, jakub@redhat.com


7.3.3/15: When a using-declaration brings names from a base class into a
derived class scope, member functions and member function templates in the
derived class override and/or hide member functions and member function
templates with the same name, parameter-type-list (8.3.5), cv-qualification,
and ref-qualifier (if any) in a base class (rather than conflicting).

This isn't working properly in templates currently:

struct A {
  void f();
};

template <class T>
struct B: A
{
  using A::f;
  void f();
};



More information about the Gcc-bugs mailing list