zoecarver added a comment. > (I think you're missing something here to trigger the instantiation of the > class, such as Invalid x;.)
Yes, you're right. > The above example is valid in C++17 onwards, because in C++17 onwards, static > constexpr data members are implicitly inline, and the delayed instantiation > behavior here is correct for inline static data members. We'll need to > distinguish here between the case where the variable is implicitly inline > solely because of the MS ABI rules and the case where the variable is inline > because of the actual language rules (where it's declared either inline or > constexpr). Hmm. This is interesting. Thanks for explaining. Because this patch isn't going to help solve the Swift interop issue anymore, I don't feel a need to continue with it. However, if you still think it would be a valuable change to make, I'm happy to continue working on it. I think we'd basically need a condition that says: `is-microsoft && less-than-cxx17 && is-constexpr && is-static-data-member`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98904/new/ https://reviews.llvm.org/D98904 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits