[libcxx-commits] [PATCH] D90968: Fix for the Bug 41784

Ruslan Arutyunyan via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 12 08:58:21 PST 2021


rarutyun marked 2 inline comments as done.
rarutyun added inline comments.


================
Comment at: libcxx/include/atomic:1799
+    // delete explicitly in the most derived class to fix the Bug 41784
+    atomic& operator=(const atomic&) = delete;
+    atomic& operator=(const atomic&) volatile = delete;
----------------
zoecarver wrote:
> IIUC this line is a NFC? I think it makes sense to have these both here, just checking. 
If my assumption is correct that NFC is "Not Functional Change")) then the answer is not exactly. Technically I think we can leave one overload but in that case user would get less informative compiler message (checked on clang). Depending on what overload we choose to leave the user may see either message about ambiguity of `operator=` or that `atomic` does not provide the copy-assignment with `volatile` qualifier.

With the current patch user sees clear message: "overload resolution selected deleted operator '='"


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

https://reviews.llvm.org/D90968



More information about the libcxx-commits mailing list