[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

Roy Jacobson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 09:00:52 PDT 2022


royjacobson added a comment.

In D127593#3596601 <https://reviews.llvm.org/D127593#3596601>, @sberg wrote:

> Is it intended that a deleted copy assignment op as in `struct S { void operator =(S &) = delete; };` (though, somewhat oddly, not in `struct S { void operator =(S) = delete; };`) is now marked as trivial?
>
> I think that's the root cause why a build of PDFium with clang-cl against the MSVC standard library started to fail for me now, effectively complaining that `__is_trivially_assignable(std::pair<int,int> &, std::pair<int,int> const &)` is false (as expected) while `__has_trivial_assign(std::pair<int,int>)` is (unexpectedly) true.

I don't see it on godbolt trunk: https://godbolt.org/z/KPfxWqnhd.
Did you mean other traits maybe?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127593/new/

https://reviews.llvm.org/D127593



More information about the cfe-commits mailing list