atomic.patch 498 B

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