diff --git a/folly/Utility.h b/folly/Utility.h index 11576ab147d..926d99ff27d 100644 --- a/folly/Utility.h +++ b/folly/Utility.h @@ -493,8 +493,8 @@ struct unsafe_default_initialized_cv { #if __cpp_lib_is_constant_evaluated >= 201811L #if !defined(__MSVC_RUNTIME_CHECKS) if (!std::is_constant_evaluated()) { - T uninit; - return uninit; + aligned_storage_for_t uninit; + return reinterpret_cast(uninit); } #endif // !defined(__MSVC_RUNTIME_CHECKS) #endif