[libcxx-commits] [PATCH] D62233: General shared_ptr cleanup
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 22 07:28:15 PDT 2019
mclow.lists added a comment.
> stop using compressed_pair to store objects.
Besides breaking the ABI, what's the motivation to stop using `compressed_pair`?
Many allocators are "state-free", and there's no need to actually *store* one of them.
That's the **purpose** of `compressed_pair`, to not store objects that have no state.
given two types `T` and `A`, where `A` has no non-static data members (and no virtual functions), we have
`sizeof(std::pair<T, A>) == sizeof(T) + sizeof(A)` + possible padding.
`sizeof(compressed_pair<T,A>) == sizeof(T)`
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62233/new/
https://reviews.llvm.org/D62233
More information about the libcxx-commits
mailing list