<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/include/streambuf, 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++] Add internal checks for some basic_streambuf invariants (#144602)</title>
<updated>2025-08-20T15:09:39+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2025-08-20T15:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2e2349e4e95ff87b41e6ada20909e508501f5651'/>
<id>2e2349e4e95ff87b41e6ada20909e508501f5651</id>
<content type='text'>
These invariants are always expected to hold, however it's not always
clear that they do. Adding explicit checks for these invariants inside
non-trivial functions of basic_streambuf makes that clear.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These invariants are always expected to hold, however it's not always
clear that they do. Adding explicit checks for these invariants inside
non-trivial functions of basic_streambuf makes that clear.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][NFC] Refactor basic_streambuf to use public API functions when possible (#144547)</title>
<updated>2025-06-17T20:38:27+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2025-06-17T20:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7c4b2be983e900663a8d766ea9dc6f03b713e5b0'/>
<id>7c4b2be983e900663a8d766ea9dc6f03b713e5b0</id>
<content type='text'>
The implementation of std::basic_streambuf used private member variables
to manipulate the get and the put areas. Using public API functions is
equivalent but leads to code that is easier to understand, since the
public API functions are known more widely than our internal member
variables. Using the public API functions removes the need to map the
internal member variables back to get/put area manipulation functions in
one's head.

Finally, it also makes it easier to find subtle issues by instrumenting
accessor functions, which is impossible if the class uses the member
variables directly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation of std::basic_streambuf used private member variables
to manipulate the get and the put areas. Using public API functions is
equivalent but leads to code that is easier to understand, since the
public API functions are known more widely than our internal member
variables. Using the public API functions removes the need to map the
internal member variables back to get/put area manipulation functions in
one's head.

Finally, it also makes it easier to find subtle issues by instrumenting
accessor functions, which is impossible if the class uses the member
variables directly.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc++] Introduce ABI sensitive areas to avoid requiring _LIBCPP_HIDE_FROM_ABI everywhere (#131156)" (#141756)</title>
<updated>2025-05-28T16:04:51+00:00</updated>
<author>
<name>James Y Knight</name>
<email>jyknight@google.com</email>
</author>
<published>2025-05-28T16:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c3656afdf111901977792c1d9589cb32ee1b6015'/>
<id>c3656afdf111901977792c1d9589cb32ee1b6015</id>
<content type='text'>
This reverts commit c861fe8a71e64f3d2108c58147e7375cd9314521.

Unfortunately, this use of hidden visibility attributes causes
user-defined specializations of standard-library types to also be marked
hidden by default, which is incorrect. See discussion thread on #131156.

...and also reverts the follow-up commits:

Revert "[libc++] Add explicit ABI annotations to functions from the block runtime declared in &lt;__functional/function.h&gt; (#140592)"
This reverts commit 3e4c9dc299c35155934688184319d391b298fff7.

Revert "[libc++] Make ABI annotations explicit for windows-specific code (#140507)"
This reverts commit f73287e623a6c2e4a3485832bc3e10860cd26eb5.

Revert "[libc++][NFC] Replace a few "namespace std" with the correct macro (#140510)"
This reverts commit 1d411f27c769a32cb22ce50b9dc4421e34fd40dd.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c861fe8a71e64f3d2108c58147e7375cd9314521.

Unfortunately, this use of hidden visibility attributes causes
user-defined specializations of standard-library types to also be marked
hidden by default, which is incorrect. See discussion thread on #131156.

...and also reverts the follow-up commits:

Revert "[libc++] Add explicit ABI annotations to functions from the block runtime declared in &lt;__functional/function.h&gt; (#140592)"
This reverts commit 3e4c9dc299c35155934688184319d391b298fff7.

Revert "[libc++] Make ABI annotations explicit for windows-specific code (#140507)"
This reverts commit f73287e623a6c2e4a3485832bc3e10860cd26eb5.

Revert "[libc++][NFC] Replace a few "namespace std" with the correct macro (#140510)"
This reverts commit 1d411f27c769a32cb22ce50b9dc4421e34fd40dd.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Optimize std::getline (#121346)</title>
<updated>2025-05-19T08:59:36+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-05-19T08:59:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3a86e0bd29f30d9fc9aea91d481372a1f8f69014'/>
<id>3a86e0bd29f30d9fc9aea91d481372a1f8f69014</id>
<content type='text'>
```
-----------------------------------------------
Benchmark                   old             new
-----------------------------------------------
BM_getline_string        318 ns         32.4 ns
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
-----------------------------------------------
Benchmark                   old             new
-----------------------------------------------
BM_getline_string        318 ns         32.4 ns
```</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Introduce ABI sensitive areas to avoid requiring _LIBCPP_HIDE_FROM_ABI everywhere (#131156)</title>
<updated>2025-05-18T13:47:05+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-05-18T13:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c861fe8a71e64f3d2108c58147e7375cd9314521'/>
<id>c861fe8a71e64f3d2108c58147e7375cd9314521</id>
<content type='text'>
This patch introduces `_LIBCPP_{BEGIN,END}_EXPLICIT_ABI_ANNOTATIONS`,
which allow us to have implicit annotations for most functions, and just
where it's not "hide_from_abi everything" we add explicit annotations.
This allows us to drop the `_LIBCPP_HIDE_FROM_ABI` macro from most
functions in libc++.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces `_LIBCPP_{BEGIN,END}_EXPLICIT_ABI_ANNOTATIONS`,
which allow us to have implicit annotations for most functions, and just
where it's not "hide_from_abi everything" we add explicit annotations.
This allows us to drop the `_LIBCPP_HIDE_FROM_ABI` macro from most
functions in libc++.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Backport segmented iterator optimization for std::for_each to C++11 (#134960)</title>
<updated>2025-04-19T11:12:43+00:00</updated>
<author>
<name>Peng Liu</name>
<email>winner245@hotmail.com</email>
</author>
<published>2025-04-19T11:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e9280a1d39af88468ffea9a14fad5bf96d51d6e6'/>
<id>e9280a1d39af88468ffea9a14fad5bf96d51d6e6</id>
<content type='text'>
Previously, the segmented iterator optimization for `std::for_each` was restricted to C++23 and later due to its dependency on `__movable_box`, which is not available in earlier standards. This patch eliminates that restriction, enabling consistent optimizations starting from C++11. 

By backporting this enhancement, we improve performance across older standards and create opportunities to extend similar optimizations to other algorithms by forwarding their calls to `std::for_each`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the segmented iterator optimization for `std::for_each` was restricted to C++23 and later due to its dependency on `__movable_box`, which is not available in earlier standards. This patch eliminates that restriction, enabling consistent optimizations starting from C++11. 

By backporting this enhancement, we improve performance across older standards and create opportunities to extend similar optimizations to other algorithms by forwarding their calls to `std::for_each`.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Remove _LIBCPP_TEMPLATE_VIS (#134885)</title>
<updated>2025-04-09T21:47:57+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-04-09T21:47:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af9c04fa689029c80451ec2c497509c7bd28534f'/>
<id>af9c04fa689029c80451ec2c497509c7bd28534f</id>
<content type='text'>
The need for `_LIBCPP_TEMPLATE_VIS` has been removed in #133233.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The need for `_LIBCPP_TEMPLATE_VIS` has been removed in #133233.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Inline basic_streambuf functions (#123379)</title>
<updated>2025-01-23T10:01:58+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-01-23T10:01:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=08195f31ab1c484ad59dea125bfd61316a07eee8'/>
<id>08195f31ab1c484ad59dea125bfd61316a07eee8</id>
<content type='text'>
Most of the `basic_streambuf` functions are really simple, which makes
most of the implementation when they are out of line boilerplate.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the `basic_streambuf` functions are really simple, which makes
most of the implementation when they are out of line boilerplate.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)</title>
<updated>2024-12-21T12:01:48+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-12-21T12:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9a2658a3e8bd13b0f9e7a8a440832a95b377216'/>
<id>b9a2658a3e8bd13b0f9e7a8a440832a95b377216</id>
<content type='text'>
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside &lt;vector&gt;
#ifdef _LIBCPP_CXX03_LANG
#  include &lt;__cxx03/vector&gt;
#else
  // normal &lt;vector&gt; content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside &lt;vector&gt;
#ifdef _LIBCPP_CXX03_LANG
#  include &lt;__cxx03/vector&gt;
#else
  // normal &lt;vector&gt; content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Add #if 0 block to all the top-level headers (#119234)</title>
<updated>2024-12-10T15:02:12+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-12-10T15:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c166a9c713ec86b86f1f178a5133bc128fd0a610'/>
<id>c166a9c713ec86b86f1f178a5133bc128fd0a610</id>
<content type='text'>
Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
separate commit instead.

This is part of
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
separate commit instead.

This is part of
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.</pre>
</div>
</content>
</entry>
</feed>
