userver icon indicating copy to clipboard operation
userver copied to clipboard

Add std::launder to FastPimpl

Open linuxnyasha opened this issue 10 months ago • 1 comments

linuxnyasha avatar Apr 28 '24 17:04 linuxnyasha

This patch breaks code:

error: incomplete type 'experiments3::models::ClientsCacheImpl' where a complete type is required
    return __builtin_launder(__p);
           ^
userver/universal/include/userver/utils/fast_pimpl.hpp:106:38: note: in instantiation of function template specialization 'std::launder<models::ClientsCacheImpl>' requested here
  T* AsHeld() noexcept { return std::launder(reinterpret_cast<T*>(&storage_)); }

Issue in clang: https://github.com/llvm/llvm-project/issues/90949

apolukhin avatar May 03 '24 08:05 apolukhin