Change memory_order to an enum class and fix all references to it (which expect it to implicitly cast to an int).
For reference: P0439R0.
Paths
| Differential D58201
Make std::memory_order an enum class (P0439R0) ClosedPublic Authored by zoecarver on Feb 13 2019, 12:46 PM.
Details Summary Change memory_order to an enum class and fix all references to it (which expect it to implicitly cast to an int). For reference: P0439R0.
Diff Detail Event TimelineHerald added subscribers: libcxx-commits, jdoerfert, jfb. ยท View Herald TranscriptFeb 13 2019, 12:46 PM
jfb added inline comments.
zoecarver added inline comments.
zoecarver marked 4 inline comments as done. Comment ActionsFix based on review and mark complete in status. Comment Actions Two small comments, LGTM otherwise (but would like one of the libc++ maintainers to sign off too).
EricWF added inline comments.
zoecarver added inline comments.
Comment Actions
ldionne added inline comments.
This revision now requires changes to proceed.Feb 15 2019, 9:19 AM zoecarver added inline comments.
Comment Actions This LGTM, however I'll wait before merging this because this will conflict with the non-lockfree atomic patch. It is unfortunate, but I'd rather rebase this one on top of the non-lockfree atomic one than the other way around. The non-lockfree atomic patch is much larger and complicated. This revision is now accepted and ready to land.Feb 28 2019, 6:07 PM Comment Actions No worries, it doesn't make a difference to me when/how you commit it. I am just glad I don't have to deal with the merge conflicts :P Comment Actions Okay -- I've applied the other atomic patch, can you please rebase this one on top of the latest master? Sorry for the churn. Comment Actions That was fun :P It seems like this patch no longer effects src/experimental/memory_resource.cpp other than that it should be good to go. Closed by commit rL355403: [libc++] Change memory_order to an enum class (authored by ldionne). ยท Explain WhyMar 5 2019, 6:50 AM This revision was automatically updated to reflect the committed changes.
Comment Actions For info: Followed-up with https://reviews.llvm.org/D58966 to fix build break on GCC.
Revision Contents
Diff 188815 include/atomic
src/experimental/memory_resource.cpp
test/std/atomics/atomics.order/memory_order.pass.cpp
test/std/atomics/atomics.order/memory_order_new.pass.cpp
www/cxx2a_status.html
|
This should say enum memory_order : unspecified // enum class in C++20.
We do not encode libc++ specific properties in the synopsis as far as I'm aware, and the standard does not mention anything specific here.