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++/13095] New: GCC accepts invalid using declaration


The following code in invalid IMHO, since using declarations shall refer to
members of base classes (according to [7.3.3]/4), but B<T> is not a base class.

===========================================
template <typename> struct A
{
    int i;
};

template <typename T> struct B : A<T>
{
    using B<T>::i;
    int foo() { return i; }
};
===========================================

However, gcc accepts the code since at least 2.95.x.

-- 
           Summary: GCC accepts invalid using declaration
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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