[libcxx-commits] [libcxx] [libc++] Speed up vector<bool> copy/move-ctors [1/3] (PR #120132)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 29 09:02:41 PST 2025


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

LGTM with comments applied. I would also like @philnik777 to take another look.

Personally, I find the code a lot easier to read after this PR. We call `std::copy` directly, which everyone knows well, and we set the size explicitly from the constructor. That removes the need for calling `__construct_at_end`, which has a strange contract like that of only being called when the vector is empty.

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


More information about the libcxx-commits mailing list