[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Fri May 17 12:59:33 PDT 2024


Endilll wrote:

> It might violate https://eel.is/c++draft/temp.inst#11 to attempt to instantiate the unused S::operator int<int>?

I don't think this clause of the standard is violated: you need to instantiate a declaration of the conversion function to at the end of definition of `M`, otherwise you can't "determine the correctness of the default member initializer" in `int x = S();`;

https://github.com/llvm/llvm-project/pull/87933


More information about the cfe-commits mailing list