blob: 16f71840d0a12ba3aaa924729a700fbc7b8a8bc4 [file] [log] [blame]
Richard Smithbe3980b2015-03-27 00:41:57 +00001struct A { int a_member; };
2namespace { inline int use_a(A a) { return a.a_member; } }
3
Richard Smith65ebb4a2015-03-26 04:09:53 +00004class B {
5 struct Inner1 {};
Richard Smithbe3980b2015-03-27 00:41:57 +00006public:
Richard Smith65ebb4a2015-03-26 04:09:53 +00007 struct Inner2;
8};
Richard Smithbe3980b2015-03-27 00:41:57 +00009// Check that lookup and access checks are performed in the right context.
Richard Smith65ebb4a2015-03-26 04:09:53 +000010struct B::Inner2 : Inner1 {};
Richard Smithbe3980b2015-03-27 00:41:57 +000011
12// Check that base-specifiers are correctly disambiguated.
13template<int N> struct C_Base { struct D { constexpr operator int() const { return 0; } }; };
14const int C_Const = 0;
15struct C1 : C_Base<C_Base<0>::D{}> {} extern c1;
16struct C2 : C_Base<C_Const<0>::D{} extern c2;
Richard Smitha5230222015-03-27 01:37:43 +000017
18typedef struct { int a; void f(); struct X; } D;
19struct D::X { int dx; } extern dx;
20namespace { inline int use_dx(D::X dx) { return dx.dx; } }