struct A { int a_member; }; inline int use_a(A a) { return a.a_member; } class B { struct Inner1 {}; public: struct Inner2; template void f(); }; // Check that lookup and access checks are performed in the right context. struct B::Inner2 : Inner1 {}; template void B::f() {} // Check that base-specifiers are correctly disambiguated. template struct C_Base { struct D { constexpr operator int() const { return 0; } }; }; const int C_Const = 0; struct C1 : C_Base::D{}> {} extern c1; struct C2 : C_Base::D{} extern c2; typedef struct { int a; void f(); struct X; } D; struct D::X { int dx; } extern dx; inline int use_dx(D::X dx) { return dx.dx; } template int E(T t) { return t; } template struct F { int f(); template int g(); static int n; }; template int F::f() { return 0; } template template int F::g() { return 0; } template int F::n = 0; //template<> template int F::g() { return 0; } // FIXME: Re-enable this once we support merging member specializations. template<> struct F { int h(); }; inline int F::h() { return 0; } template struct F { int i(); }; template int F::i() { return 0; } namespace G { enum A { a, b, c, d, e }; enum { f, g, h }; typedef enum { i, j } k; typedef enum {} l; } template class K = F> int H(int a = 1); template class K = F> using I = decltype(H()); template class K = F> struct J {}; namespace NS { struct A {}; template struct B : A {}; template struct B : B {}; template<> struct B : B {}; inline void f() {} } namespace StaticInline { struct X {}; static inline void f(X); static inline void g(X x) { f(x); } } namespace FriendDefArg { template struct A; template struct B; template class = A> struct C; template class = A> struct D {}; template struct Y { template friend struct A; template friend struct B; template class> friend struct C; template class> friend struct D; }; }