[libcxx-commits] [libcxx] [libcxx] optimize sized-based vector representation to reduce binary size (PR #216822)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 18 00:00:50 PDT 2026
================
@@ -466,7 +466,15 @@ class _LIBCPP_WARN_UNUSED vector {
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x) { emplace_back(std::move(__x)); }
template <class... _Args>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __emplace_back_result_t emplace_back(_Args&&... __args);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __emplace_back_result_t emplace_back(_Args&&... __args) {
----------------
philnik777 wrote:
This should _really_ be split into its own patch. We've tried quite a bit to make this optimize properly, and this basically reverts that. That patch should probably include an analysis _what_ actually prevents some optimization here.
https://github.com/llvm/llvm-project/pull/216822
More information about the libcxx-commits
mailing list