================ @@ -215,6 +215,14 @@ struct NewUnspecified; SingleTemplate<void (IncSingle::*)()> tmpl_single; UnspecTemplate<void (NewUnspecified::*)()> tmpl_unspec; +// Member pointers used in base specifiers force an unspecified inheritance model +struct MemPtrInBase : UnspecTemplate<void (MemPtrInBase::*)()> {}; ---------------- MitalAshok wrote:
I see what you mean. If there were two bases `struct MemPtrInBase : UnspecTemplate<void (MemPtrInBase::*)()>, SomeOtherClass {`, `UnspecTemplate<void (MemPtrInBase::*)()>` would be instantiated and completed before the token for `SomeOtherClass` is seen. So this is the case for Clang, but I don't see why a different compiler couldn't parse all the bases at once then instantiated them. However, they need to be instantiated at least before the body of the struct is parsed (because the bases affect name lookup), and this is essentially the same time as when you are "parsing the base specifiers". And of course it needs to match Microsoft behaviour and assign the unspecified inheritance model during this time. https://github.com/llvm/llvm-project/pull/91990 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits