[libcxx-commits] [PATCH] D103983: [libc++] Improve atomic_fetch_(add|sub).*.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 8 08:45:18 PDT 2021


Mordante added inline comments.


================
Comment at: libcxx/docs/ReleaseNotes.rst:62-63
+- The functions ``std::atomic<T*>::fetch_(add|sub)`` and
+  ``std::atomic_fetch_(add|sub)`` no longer accept a function pointer. This
+  isn't allowed by the Standard. While this is technically an API break, the
+  invalid syntax isn't supported by libstc++ and MSVC STL.
----------------
Quuxplusone wrote:
> Here and on line 68, I strongly recommend removing the sentence `This isn't allowed by the Standard.`. I mean, we wouldn't make the change if it weren't //allowed//, right?
> I think what you meant is `The old behavior wasn't conforming; the new behavior is (more) conforming.` But we don't need to say that either; those who trust their library vendor will assume that the change moves in the right direction (not the wrong direction), and those who don't trust, can just go read the Standard themselves if they want some kind of rationale for why we're suddenly implementing the Standard behavior.
I don't feel it's wrong to mention it. However I'm not strongly attached to the sentence, so I've removed it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103983



More information about the libcxx-commits mailing list