xroche wrote: > Oh, I see. I guess Microsoft decided that changing the destruction order > would be an ABI break, and therefore shouldn't be done. Maybe we should > follow MSVC here. How hard would it be to match MSVC for operator[] (use > left-to-right if no arguments have a non-trivial destructor, use > right-to-left otherwise)? > > It's interesting that they intentionally didn't fix operator(); not clear why.
I tried that rule with [MSVC 19.51](https://godbolt.org/z/rcqMEj8jn): `CopyOnly` has a trivial destructor but gets reordered, while `DtorOnly` has a non-trivial destructor but stays left-to-right. On x86, `CopyOnly` even uses a mixed order, so a destructor check cannot match MSVC. https://github.com/llvm/llvm-project/pull/215479 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
