[libcxx-commits] [PATCH] D112319: [NFC][libcxx] Clean up std::__call_once

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 26 11:16:34 PDT 2021


DanielMcIntosh-IBM added inline comments.


================
Comment at: libcxx/include/mutex:581-583
+        UNSET,
+        PENDING,
+        COMPLETE = ~_State_type(0)
----------------
Quuxplusone wrote:
> This approach looks reasonable to me. However,
> - Looks like Clang does not support `enum E : U {` as an extension to C++03, which explains the failing C++03 tests now. Maybe you can keep `__state_` as an integer type and just use a C++03 enum to name these values? Or just use `static const _State_type` static data members.
> - These identifiers will need to be `_Uglified` because they're in a public header. Moving them into `mutex.cpp` would be one option; or you could make them `_Unset`, `_Pending`, `_Complete`. (Compare to the private enum types in `<filesystem>`.)
> - And you'll still have to wait for @ldionne to look at this PR in general.
I would have put them inside mutex.cpp, except then they couldn't be used here on line 587, 673, 689, and 701


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112319



More information about the libcxx-commits mailing list