aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/re2/patches/atomic.patch
blob: dceec1ea31a562bc7c189169bea124070b8f7967 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- a/re2/re2.cc	(index)
+++ b/re2/re2.cc	(working tree)
@@ -1312,7 +1312,7 @@ union Hook {
 #if !defined(__clang__) && defined(_MSC_VER)
   // Citing https://github.com/protocolbuffers/protobuf/pull/4777 as precedent,
   // this is a gross hack to make std::atomic<T*> constant-initialized on MSVC.
-  static_assert(ATOMIC_POINTER_LOCK_FREE == 2,
+  static_assert(std::atomic<T*>::is_always_lock_free,
                 "std::atomic<T*> must be always lock-free");
   T* cb_for_constinit_;
 #endif