// When we import this class, make sure that we bail before trying to import // its sub-decls (i.e., "ForwardDeclaredSibling"). struct CannotImport { void test(struct ForwardDeclaredSibling *) {} ~CannotImport() = delete; CannotImport(CannotImport const &) = delete; }; // We shouldn't be able to import this class either because it also doesn't have // a copy ctor or destructor. struct ForwardDeclaredSibling : CannotImport {}; // This is a longer regression test to make sure we don't improperly cache a // typedef that's invalid. namespace RegressionTest { template struct pointer_traits { template struct rebind { typedef To other; }; }; template struct Convert { typedef typename pointer_traits::template rebind::other type; }; template struct Forward; template struct SomeTypeTrait { typedef Forward *F; typedef typename Convert::type A; }; template struct Forward { typedef typename SomeTypeTrait::A A; private: ~Forward() = delete; Forward(Forward const &) = delete; }; template struct SomeOtherTypeTrait : SomeTypeTrait { typedef typename SomeTypeTrait::A A; }; // Just to instantiate all the templates. struct FinalUser { typedef Forward F; typedef SomeOtherTypeTrait O; typedef SomeTypeTrait Z; }; void test(typename FinalUser::Z) {} } // namespace RegressionTest