[libcxx-commits] [libcxx] [libc++] Fix padding calculation for function reference types (PR #142125)

Shafik Yaghmour via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 2 11:59:50 PDT 2025


================
@@ -63,9 +62,17 @@ inline const size_t __compressed_pair_alignment = _LIBCPP_ALIGNOF(_Tp);
 template <class _Tp>
 inline const size_t __compressed_pair_alignment<_Tp&> = _LIBCPP_ALIGNOF(void*);
 
-template <class _ToPad,
-          bool _Empty = ((is_empty<_ToPad>::value && !__libcpp_is_final<_ToPad>::value) ||
-                         is_reference<_ToPad>::value || sizeof(_ToPad) == __datasizeof_v<_ToPad>)>
+template <class _ToPad>
----------------
shafik wrote:

Do this have to be updated as well? 

https://github.com/llvm/llvm-project/blob/18e51314c41ea3093f28659cd15095778dfe88f7/lldb/packages/Python/lldbsuite/test/make/libcxx-simulators-common/compressed_pair.h#L75-L81

https://github.com/llvm/llvm-project/pull/142125


More information about the libcxx-commits mailing list