frederick-vs-ja wrote:

IIUC this intrinsic is unrelated to assignment operators. Do you have any plan 
for `__is_bitwise_assignable`, which should determine whether the assignment 
operator equivalently copies the value representation, possibly modulo the 
vptrs?

```C++
struct Cat {}; // bitwise copy assignable
struct Leopard : Cat { // is_trivially_assignable_v returns true but not 
bitwise copy assignable
    int spots_;
    Leopard& operator=(Leopard&) = delete;
    using Cat::operator=; // We can detect this by metaprogramming as operator= 
overloads have wrong types.
};
struct LeopardHouse { // is_trivially_assignable_v returns true but not bitwise 
copy assignable
    Leopard _;
    // Non-bitwise-assignability *can't* be detected by metaprogramming since 
operator= overloads have right types.
};
```

https://github.com/llvm/llvm-project/pull/86512
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to