<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/include/__split_buffer, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc++] Remove __is_replaceable emulation (#167355)</title>
<updated>2025-11-11T12:53:56+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2025-11-11T12:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=17ce48f2b687ce86890b770c9af9e1087211f8b7'/>
<id>17ce48f2b687ce86890b770c9af9e1087211f8b7</id>
<content type='text'>
The Trivial Relocation feature has been removed from the C++26 working
draft. Based on discussions in Kona, it is unlikely that the
"replaceable" type concept will come back in the C++29 time frame.

Since we don't have a use for the type trait in the library at the
moment, remove the code associated to it. If we end up needing something
like it in the future, we can always add it back.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Trivial Relocation feature has been removed from the C++26 working
draft. Based on discussions in Kona, it is unlikely that the
"replaceable" type concept will come back in the C++29 time frame.

Since we don't have a use for the type trait in the library at the
moment, remove the code associated to it. If we end up needing something
like it in the future, we can always add it back.</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxx] adds size-based `__split_buffer` representation to unstable ABI (#139632)</title>
<updated>2025-09-12T13:33:10+00:00</updated>
<author>
<name>Christopher Di Bella</name>
<email>cjdb@google.com</email>
</author>
<published>2025-09-12T13:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e8f61801c6237e56b3d69190af7a7acfdcede1e8'/>
<id>e8f61801c6237e56b3d69190af7a7acfdcede1e8</id>
<content type='text'>
**tl;dr** We can significantly improve the runtime performance of
`std::vector` by changing its representation from three pointers to one
pointer and two integers. This document explains the details of this
change, along with the justifications for making it. See the [RFC] for
more information.

`vector` depends on `__split_buffer` for inserting elements. Changing
`__split_buffer` to match `vector`'s representation simplifies the
model, as it eliminates the need to convert between two different
representations of a contiguous buffer in the same configuration of
libc++.

[RFC]: https://discourse.llvm.org/t/adding-a-size-based-vector-to-libc-s-unstable-abi/86306

---------

Co-authored-by: Jorge Gorbe Moya &lt;jgorbe@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**tl;dr** We can significantly improve the runtime performance of
`std::vector` by changing its representation from three pointers to one
pointer and two integers. This document explains the details of this
change, along with the justifications for making it. See the [RFC] for
more information.

`vector` depends on `__split_buffer` for inserting elements. Changing
`__split_buffer` to match `vector`'s representation simplifies the
model, as it eliminates the need to convert between two different
representations of a contiguous buffer in the same configuration of
libc++.

[RFC]: https://discourse.llvm.org/t/adding-a-size-based-vector-to-libc-s-unstable-abi/86306

---------

Co-authored-by: Jorge Gorbe Moya &lt;jgorbe@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Add the __is_replaceable type trait (#132408)</title>
<updated>2025-05-08T20:35:00+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2025-05-08T20:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45d493b680e3e79e4e9c19d665df83823c52a73a'/>
<id>45d493b680e3e79e4e9c19d665df83823c52a73a</id>
<content type='text'>
That type trait represents whether move-assigning an object is
equivalent to destroying it and then move-constructing a new one from
the same argument. This will be useful in a few places where we may want
to destroy + construct instead of doing an assignment, in particular
when implementing some container operations in terms of relocation.

This is effectively adding a library emulation of P2786R12's
is_replaceable trait, similarly to what we do for trivial relocation.
Eventually, we can replace this library emulation by the real
compiler-backed trait.

This is building towards #129328.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That type trait represents whether move-assigning an object is
equivalent to destroying it and then move-constructing a new one from
the same argument. This will be useful in a few places where we may want
to destroy + construct instead of doing an assignment, in particular
when implementing some container operations in terms of relocation.

This is effectively adding a library emulation of P2786R12's
is_replaceable trait, similarly to what we do for trivial relocation.
Eventually, we can replace this library emulation by the real
compiler-backed trait.

This is building towards #129328.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][libc++] Guard against operator&amp; hijacking. (#128351)</title>
<updated>2025-02-27T16:47:34+00:00</updated>
<author>
<name>Mark de Wever</name>
<email>koraq@xs4all.nl</email>
</author>
<published>2025-02-27T16:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da618cf0a76371ca89769ca706fe39cc92fbf7d6'/>
<id>da618cf0a76371ca89769ca706fe39cc92fbf7d6</id>
<content type='text'>
This set usage of operator&amp; instead of std::addressof seems not be easy
to "abuse". Some seem easy to misuse, like basic_ostream::operator&lt;&lt;,
trying to do that results in compilation errors since the `widen`
function is not specialized for the hijacking character type. Hence
there are no tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This set usage of operator&amp; instead of std::addressof seems not be easy
to "abuse". Some seem easy to misuse, like basic_ostream::operator&lt;&lt;,
trying to do that results in compilation errors since the `widen`
function is not specialized for the hijacking character type. Hence
there are no tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Put _LIBCPP_NODEBUG on all internal aliases (#118710)</title>
<updated>2025-01-08T16:12:59+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-01-08T16:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f69585235ec85d54e0f3fc41b2d5700430907f99'/>
<id>f69585235ec85d54e0f3fc41b2d5700430907f99</id>
<content type='text'>
This significantly reduces the amount of debug information generated
for codebases using libc++, without hurting the debugging experience.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This significantly reduces the amount of debug information generated
for codebases using libc++, without hurting the debugging experience.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Remove some unused includes (#120219)</title>
<updated>2024-12-18T20:10:27+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-12-18T20:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b905bcc5090cde734e8b7bbceae13bd5a606cc14'/>
<id>b905bcc5090cde734e8b7bbceae13bd5a606cc14</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Fix improper static_cast in std::deque and __split_buffer (#119106)</title>
<updated>2024-12-13T14:28:30+00:00</updated>
<author>
<name>Peng Liu</name>
<email>winner245@hotmail.com</email>
</author>
<published>2024-12-13T14:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=979e9361f0e0426e555c94cb8b1a64c655805765'/>
<id>979e9361f0e0426e555c94cb8b1a64c655805765</id>
<content type='text'>
This PR addresses the improper use of `static_cast` to `size_t` where
`size_type` is intended. Although the `size_type` member type of STL
containers is usually a synonym of `std::size_t`, there is no guarantee
that they are always equivalent. The C++ standard does not mandate this
equivalence.

In libc++'s implementations of `std::deque`, `std::vector`, and
`__split_buffer`, the `size_type` member type is defined as
`std::allocator_traits&lt;allocator_type&gt;::size_type`, which is either
`allocator_type::size_type` if available or
`std::make_unsigned&lt;difference_type&gt;::type`. While it is true for
`std::allocator` that the `size_type` member type is `std::size_t`, for
user-defined allocator types, they may mismatch. This justifies the need
to replace `static_cast&lt;size_t&gt;` with `static_cast&lt;size_type&gt;` in this
PR.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR addresses the improper use of `static_cast` to `size_t` where
`size_type` is intended. Although the `size_type` member type of STL
containers is usually a synonym of `std::size_t`, there is no guarantee
that they are always equivalent. The C++ standard does not mandate this
equivalence.

In libc++'s implementations of `std::deque`, `std::vector`, and
`__split_buffer`, the `size_type` member type is defined as
`std::allocator_traits&lt;allocator_type&gt;::size_type`, which is either
`allocator_type::size_type` if available or
`std::make_unsigned&lt;difference_type&gt;::type`. While it is true for
`std::allocator` that the `size_type` member type is `std::size_t`, for
user-defined allocator types, they may mismatch. This justifies the need
to replace `static_cast&lt;size_t&gt;` with `static_cast&lt;size_type&gt;` in this
PR.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Fix capacity increase issue with `shrink_to_fit` for `__split_buffer` (#117720)</title>
<updated>2024-11-26T21:38:47+00:00</updated>
<author>
<name>Peng Liu</name>
<email>winner245@hotmail.com</email>
</author>
<published>2024-11-26T21:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8458bbe5947db75041579c7c1a0f7f79c8e992d9'/>
<id>8458bbe5947db75041579c7c1a0f7f79c8e992d9</id>
<content type='text'>
This PR fixes the issue where `__split_buffer::shrink_to_fit` may
unexpectedly increase the capacity, similar to the issue for
`std::vector` in #97895. The fix follows the same approach
used in #97895 for `std::vector`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR fixes the issue where `__split_buffer::shrink_to_fit` may
unexpectedly increase the capacity, similar to the issue for
`std::vector` in #97895. The fix follows the same approach
used in #97895 for `std::vector`.</pre>
</div>
</content>
</entry>
<entry>
<title>Unify naming of internal pointer members in std::vector and std::__split_buffer (#115517)</title>
<updated>2024-11-13T10:08:08+00:00</updated>
<author>
<name>Peng Liu</name>
<email>winner245@hotmail.com</email>
</author>
<published>2024-11-13T10:08:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c7df10643bda4acdc9a02406a2eee8aa4ced747f'/>
<id>c7df10643bda4acdc9a02406a2eee8aa4ced747f</id>
<content type='text'>
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&lt;pointer, allocator_type&gt;` 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`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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&lt;pointer, allocator_type&gt;` 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`.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][NFC] Remove unused functions from &lt;__split_buffer&gt; (#115735)</title>
<updated>2024-11-12T21:55:59+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-11-12T21:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=36fa8bdfa0130b6233a4ef2b8619702533a9f4df'/>
<id>36fa8bdfa0130b6233a4ef2b8619702533a9f4df</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
