summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/access20.C
blob: ebf575e6c30a82f9dd93c2edd2edbc6ba0578a97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/29470

template <typename T> struct B
{
        protected:
        T v;			// { dg-error "protected" }
};
template <typename T> struct D : B<T>
{
        protected:
        using B<T>::v;
};
int main()
{
        D<int> d;
        d.v = 0;		// { dg-error "context" }
        return 0;
}