Closed
Description
#include <type_traits>
#include <utility>
struct trivially_copyable_no_assignment {
int arr[4];
trivially_copyable_no_assignment& operator=(const trivially_copyable_no_assignment&) = delete;
};
static_assert(std::is_trivially_copyable<std::pair<trivially_copyable_no_assignment, int> >::value, "");
int main() { }
is_trivially_copyable
was true on Clang 15 and became false on Clang 16 and above. This only affects C++23 and C++26, which also means that we now have a different ABI between C++20 and C++23 in recent Clangs.
Godbolt: https://godbolt.org/z/hEWq59oeP