[libcxx-commits] [PATCH] D59029: [libc++] Do not specify the underlying type of memory_order

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 6 09:06:28 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL355521: [libc++] Do not specify the underlying type of memory_order (authored by ldionne, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D59029?vs=189519&id=189522#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D59029

Files:
  libcxx/trunk/include/atomic


Index: libcxx/trunk/include/atomic
===================================================================
--- libcxx/trunk/include/atomic
+++ libcxx/trunk/include/atomic
@@ -586,7 +586,7 @@
 
 #if _LIBCPP_STD_VER > 17
 
-enum class memory_order: unsigned {
+enum class memory_order {
   relaxed, consume, acquire, release, acq_rel, seq_cst
 };
 
@@ -597,9 +597,6 @@
 inline constexpr auto memory_order_acq_rel = memory_order::acq_rel;
 inline constexpr auto memory_order_seq_cst = memory_order::seq_cst;
 
-static_assert((is_same<underlying_type<memory_order>::type,
-			   unsigned>::value), "Underlying type differs from unsigned unexpectedly");
-
 #else
 
 typedef enum memory_order {
@@ -607,12 +604,9 @@
   memory_order_release, memory_order_acq_rel, memory_order_seq_cst
 } memory_order;
 
-static_assert((is_same<underlying_type<memory_order>::type,
-			   unsigned>::value), "Underlying type differs from unsigned unexpectedly");
-
 #endif // _LIBCPP_STD_VER > 17
 
-typedef underlying_type<memory_order>::type __memory_order_underlying_t; // unsigned
+typedef underlying_type<memory_order>::type __memory_order_underlying_t;
 
 
 #if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) || \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59029.189522.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190306/83082025/attachment.bin>


More information about the libcxx-commits mailing list