[libcxx-commits] [libcxx] [libc++] Refactor __split_buffer to eliminate code duplication (PR #114138)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 30 05:01:59 PDT 2024
frederick-vs-ja wrote:
> The other patch removed some code duplication, but this introduces `emplace_front` and only uses it to implement `push_front`. What is the point of that?
There're currently 2 `push_front` overloads, taking `const value_type&` and `value_type&&` respectively, containing almost identical code. The newly introduced `emplace_front` makes the code only written once.
https://github.com/llvm/llvm-project/pull/114138
More information about the libcxx-commits
mailing list