Эх сурвалжийг харах

made better error message for <atomic>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/tags/libcpp-16@128699 91177308-0d34-0410-b5e6-96231b3b80d8
Howard Hinnant 14 жил өмнө
parent
commit
b35e5e29aa
1 өөрчлөгдсөн 6 нэмэгдсэн , 0 устгасан
  1. 6 0
      include/atomic

+ 6 - 0
include/atomic

@@ -530,6 +530,10 @@ void atomic_signal_fence(memory_order m);
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+#if !__has_feature(cxx_atomic)
+#error <atomic> is not implemented
+#else
+
 typedef enum memory_order
 {
     memory_order_relaxed, memory_order_consume, memory_order_acquire,
@@ -1502,6 +1506,8 @@ typedef atomic<uintmax_t> atomic_uintmax_t;
 #define ATOMIC_LONG_LOCK_FREE 0
 #define ATOMIC_LLONG_LOCK_FREE 0
 
+#endif  //  !__has_feature(cxx_atomic)
+
 _LIBCPP_END_NAMESPACE_STD
 
 #endif  // _LIBCPP_ATOMIC