Bug 96288

Summary: [DR 1734] __is_trivial and __is_trivially_copyable fails for deleted members
Product: gcc Reporter: Roland Schulz <roland>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: mpolacek, nevin, webrown.cpp
Priority: P3 Keywords: rejects-valid
Version: unknown   
Target Milestone: ---   
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98936
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85723
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58074
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2024-06-18 00:00:00

Description Roland Schulz 2020-07-22 16:10:51 UTC
https://godbolt.org/z/snjof8

The resolution of 1734 requires the class:
- has at least one non-deleted copy constructor, move constructor, copy assignment operator, or move assignment operator, and
- has a trivial, non-deleted destructor

Therefore all 4 static-asserts should pass.

Same bug in LLVM with discussion of ABI impact: https://bugs.llvm.org/show_bug.cgi?id=39050