MaxEW707 wrote:

> Maybe we should just be testing if the copy-assignment operator is deleted? 
> For reference, MSVC also returns the following indirectly:
> 
> ```
> struct Test
> {
>     int x;
>     Test& operator=(const Test&) = delete;
> };
> Test foo();
> Test test(Test x)
> {
>   return x;
> }
> ```

Argh, I didn't even consider trying an explicitly deleted copy assignment 
operator.
That should have been obvious considering the copy assignment operator is 
implicitly delete since we have a non-static data member of a reference type.

I'll give this a try.

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

Reply via email to