PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / tc1 / dr52.C
blob7cff847023fe5e90f12e13766aef60704b1c43f6
1 // { dg-do compile }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR52: Non-static members, member selection and access checking
5 struct A 
7   void foo(void);
8 };
10 struct B
12 private:
13   void foo(void);
16 struct B1 : B {};
17 struct B2 : B {};
19 struct C
20 { // { dg-message "declared" }
21   void foo(void);
24 struct D : private C {};
26 struct X: A, B1, B2, D
28 public:
29   void bar(void)
30   {
31     this->B::foo();  // { dg-error "" }
32     this->C::foo();  // { dg-error "inaccessible|context" }
33   }