[libcxx-commits] [PATCH] D112319: [NFC][libcxx] Clean up std::__call_once
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 26 06:32:55 PDT 2021
Quuxplusone added inline comments.
================
Comment at: libcxx/include/mutex:581-583
+ UNSET,
+ PENDING,
+ COMPLETE = ~_State_type(0)
----------------
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.
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