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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 7 12:26:51 PDT 2021


Quuxplusone added a comment.

Other than the troublesome release note, this LGTM (AFAIrecall and from a quick refresher).



================
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.
----------------
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.


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