Commit f6f65f9b by Copybara-Service

Merge pull request #1448 from glandium:clang

PiperOrigin-RevId: 533121605
Change-Id: I82390045985db5db56e93c40eae24cdcd93e3ab4
parents 07e8b2a1 486db28a
...@@ -197,7 +197,7 @@ union TypeErasedState { ...@@ -197,7 +197,7 @@ union TypeErasedState {
template <class T> template <class T>
T& ObjectInLocalStorage(TypeErasedState* const state) { T& ObjectInLocalStorage(TypeErasedState* const state) {
// We launder here because the storage may be reused with the same type. // We launder here because the storage may be reused with the same type.
#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L #if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606L
return *std::launder(reinterpret_cast<T*>(&state->storage)); return *std::launder(reinterpret_cast<T*>(&state->storage));
#elif ABSL_HAVE_BUILTIN(__builtin_launder) #elif ABSL_HAVE_BUILTIN(__builtin_launder)
return *__builtin_launder(reinterpret_cast<T*>(&state->storage)); return *__builtin_launder(reinterpret_cast<T*>(&state->storage));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment