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

            Bug ID: 60705
           Summary: alias template member access ignored
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: R.HL at gmx dot net

GCC simply ignores the fact, that a private member is inaccessible:

class A
{
    struct B {};
};

template<class>
using C = A::B; // Already the declaration of this alias template is ill-formed

int main()
{
    C<A> c1;
    C<int> c2;
}

This compiles without any warnings/errors using the GCC-4.9 snapshot from the
2nd march, and is obviously ill-formed (because access control applies to all
names in all declarations,  ยง11/4).
There is AFAICS no exception for alias templates.

Reply via email to