struct A { int a_member; }; inline int use_a(A a) { return a.a_member; } class B { struct Inner1 {}; public: struct Inner2; struct Inner3; template void f(); }; struct BFriend { friend class B::Inner3; private: struct Inner3Base {}; }; // Check that lookup and access checks are performed in the right context. struct B::Inner2 : Inner1 {}; struct B::Inner3 : BFriend::Inner3Base {}; template void B::f() {} template<> inline 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<> inline int F::f() { return 0; } template<> template int F::g() { return 0; } 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; }; } namespace SeparateInline { inline void f(); void f() {} constexpr int g() { return 0; } } namespace TrailingAttributes { template struct X {} __attribute__((aligned(8))); } namespace MergeFunctionTemplateSpecializations { template T f(); template struct X { template using Q = decltype(f() + U()); }; using xiq = X::Q; } enum ScopedEnum : int; enum ScopedEnum : int { a, b, c }; namespace RedeclDifferentDeclKind { struct X {}; typedef X X; using RedeclDifferentDeclKind::X; } namespace Anon { struct X { union { int n; }; }; } namespace ClassTemplatePartialSpec { template struct F; template class A, int B> struct F> { template F(); }; template class A, int B> template F>::F() {} template struct F { template F(); }; template template F::F() {} } struct MemberClassTemplate { template struct A; }; template struct MemberClassTemplate::A {}; template struct MemberClassTemplate::A {}; template<> struct MemberClassTemplate::A {};