[libcxx-commits] [PATCH] D61139: (ABI break) Remove could-be-defaulted SMFs from `stack` and `queue` and `priority_queue`.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 25 11:49:35 PDT 2019
Quuxplusone added a comment.
> So, why would we want to do this? What's the benefit?
Benefit: maintainability (less code) and micro performance (defaulted SMFs are easier to optimize) and macro performance (defaulted SMFs are conditionally trivial/noexcept/constexpr whereas non-defaulted ones aren't).
Cost: ABI break for trivial container types.
There are no trivial container types yet in C++17, but my understanding is that C++2a (or at most, C++2b) is likely to support `fixed_capacity_vector` under the name `std::static_vector`, and that type //will// be conditionally trivial. So if libc++ were ever going to take an ABI break to gain trivial/noexcept/constexpr/defaulted SMFs, libc++ might want to do it sooner rather than later.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61139/new/
https://reviews.llvm.org/D61139
More information about the libcxx-commits
mailing list