[all-commits] [llvm/llvm-project] 5a4816: [libc++] Remove unnecessary std::vector accessors ...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Nov 18 01:48:32 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a48162dc88e0c3db7bc0a63dee0eb3182ef00e3
      https://github.com/llvm/llvm-project/commit/5a48162dc88e0c3db7bc0a63dee0eb3182ef00e3
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-11-18 (Mon, 18 Nov 2024)

  Changed paths:
    M libcxx/include/__vector/vector.h
    M libcxx/include/__vector/vector_bool.h

  Log Message:
  -----------
  [libc++] Remove unnecessary std::vector accessors (#114423)

Now that we don't use __compressed_pair anymore inside std::vector, we
can remove some unnecessary accessors. This is a mechanical replacement
of the __alloc() and __end_cap() accessors, and similar for
std::vector<bool>.

Note that I consistently used this->__alloc_ instead of just __alloc_
since most of the code in <vector> uses that pattern to access members.
I don't think this is necessary anymore (and I'm even less certain I
like this), but I went for consistency with surrounding code. If we want
to change that, we can do a follow-up mechanical change.



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