[libcxx-commits] [libcxx] [libc++] Rename __construct_one_at_end to __emplace_back_assume_capacity (PR #132276)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 21 12:51:17 PDT 2025


https://github.com/winner245 approved this pull request.

Thanks, LGTM. Previously, I found the name `__construct_one_at_end` somewhat confusing since we already have a similar member named `__construct_at_end`. Moreover, it wasn't immediately clear whether `__construct_one_at_end` updated `this->__end_` without referring to its definition. With the new name `__emplace_back_assume_capacity`, it is now evident that the function is a special case of `emplace_back`, which would update `this->__end_` upon success. 

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


More information about the libcxx-commits mailing list