[all-commits] [llvm/llvm-project] c7df10: Unify naming of internal pointer members in std::v...
Peng Liu via All-commits
all-commits at lists.llvm.org
Wed Nov 13 02:08:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7df10643bda4acdc9a02406a2eee8aa4ced747f
https://github.com/llvm/llvm-project/commit/c7df10643bda4acdc9a02406a2eee8aa4ced747f
Author: Peng Liu <winner245 at hotmail.com>
Date: 2024-11-13 (Wed, 13 Nov 2024)
Changed paths:
M libcxx/include/__split_buffer
M libcxx/include/__vector/vector.h
M libcxx/include/deque
M lldb/examples/synthetic/libcxx.py
Log Message:
-----------
Unify naming of internal pointer members in std::vector and std::__split_buffer (#115517)
Related to PR #114423, this PR proposes to unify the naming of the
internal pointer members in `std::vector` and `std::__split_buffer` for
consistency and clarity.
Both `std::vector` and `std::__split_buffer` originally used a
`__compressed_pair<pointer, allocator_type>` member named `__end_cap_`
to store an internal capacity pointer and an allocator. However,
inconsistent naming changes have been made in both classes:
- `std::vector` now uses `__cap_` and `__alloc_` for its internal
pointer and allocator members.
- In contrast, `std::__split_buffer` retains the name `__end_cap_` for
the capacity pointer, along with `__alloc_`.
This inconsistency between the names `__cap_` and `__end_cap_` has
caused confusions (especially to myself when I was working on both
classes). I suggest unifying these names by renaming `__end_cap_` to
`__cap_` in `std::__split_buffer`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list