<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/modules/std, 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++] Implement P2988R12: `std::optional&lt;T&amp;&gt;` (#155202)</title>
<updated>2025-11-12T03:00:08+00:00</updated>
<author>
<name>William Tran-Viet</name>
<email>wtranviet@proton.me</email>
</author>
<published>2025-11-12T03:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=389a23c538e33b30903b4e733f5d30f629199829'/>
<id>389a23c538e33b30903b4e733f5d30f629199829</id>
<content type='text'>
Resolves #148131

- Unlock `std::optional&lt;T&amp;&gt;` implementation
- Allow instantiations of `optional&lt;T(&amp;)(...)&gt;` and `optional&lt;T(&amp;)[]&gt;`
but disables `value_or()` and `optional::iterator` + all `iterator`
related functions
- Update documentation
- Update tests</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves #148131

- Unlock `std::optional&lt;T&amp;&gt;` implementation
- Allow instantiations of `optional&lt;T(&amp;)(...)&gt;` and `optional&lt;T(&amp;)[]&gt;`
but disables `value_or()` and `optional::iterator` + all `iterator`
related functions
- Update documentation
- Update tests</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxx] Implement C++20 std::chrono::is_clock, std::chrono::is_clock_v (#160607)</title>
<updated>2025-11-06T20:33:44+00:00</updated>
<author>
<name>Yuxuan Chen</name>
<email>ych@fb.com</email>
</author>
<published>2025-11-06T20:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=adc79324618f0e95914ac0fcb26fe0d942319cab'/>
<id>adc79324618f0e95914ac0fcb26fe0d942319cab</id>
<content type='text'>
Implemented
[[*time.traits.is.clock*]](https://eel.is/c++draft/time.traits.is.clock)
from [P0355R7](https://wg21.link/p0355r7).

This patch implements the C++20 feature `is_clock` and `is_clock_v`
based on the documentation [on
cppreference](https://en.cppreference.com/w/cpp/chrono/is_clock.html)

Fixes #166049.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implemented
[[*time.traits.is.clock*]](https://eel.is/c++draft/time.traits.is.clock)
from [P0355R7](https://wg21.link/p0355r7).

This patch implements the C++20 feature `is_clock` and `is_clock_v`
based on the documentation [on
cppreference](https://en.cppreference.com/w/cpp/chrono/is_clock.html)

Fixes #166049.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Add move constructor &amp; assignment to `exception_ptr` (#164281)</title>
<updated>2025-11-03T20:18:43+00:00</updated>
<author>
<name>Adrian Vogelsgesang</name>
<email>avogelsgesang@salesforce.com</email>
</author>
<published>2025-11-03T20:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f02b661054547b423177c9498cdb554f5036a3e0'/>
<id>f02b661054547b423177c9498cdb554f5036a3e0</id>
<content type='text'>
This commit adds move constructor, move assignment and `swap`
to `exception_ptr`. Adding those operators allows us to avoid
unnecessary calls to `__cxa_{inc,dec}rement_refcount`.

Performance results (from libc++'s CI):

```
Benchmark                               Baseline    Candidate    Difference    % Difference
------------------------------------  ----------  -----------  ------------  --------------
bm_exception_ptr_copy_assign_nonnull        9.77         9.94          0.18           1.79%
bm_exception_ptr_copy_assign_null          10.29        10.65          0.35           3.42%
bm_exception_ptr_copy_ctor_nonnull          7.02         7.01         -0.01          -0.13%
bm_exception_ptr_copy_ctor_null            10.54        10.60          0.06           0.56%
bm_exception_ptr_move_assign_nonnull       16.92        13.76         -3.16         -18.70%
bm_exception_ptr_move_assign_null          10.61        10.76          0.14           1.36%
bm_exception_ptr_move_ctor_nonnull         13.31        10.25         -3.06         -23.02%
bm_exception_ptr_move_ctor_null            10.28         7.30         -2.98         -28.95%
bm_exception_ptr_swap_nonnull              19.22         0.63        -18.59         -96.74%
bm_exception_ptr_swap_null                 20.02         7.79        -12.23         -61.07%
```

As expected, the `bm_exception_ptr_copy_*` benchmarks are not influenced by
this change. `bm_exception_ptr_move_*` benefits between 18% and 30%. The
`bm_exception_ptr_swap_*` tests show the biggest improvements since multiple
calls to the copy constructor are replaced by a simple pointer swap.

While `bm_exception_ptr_move_assign_null` did not show a regression in the CI
measurements, local measurements showed a regression from 3.98 to 4.71, i.e. by
18%. This is due to the additional `__tmp` inside `operator=`. The destructor
of `__other` is a no-op after the move because `__other.__ptr` will be a
nullptr. However, the compiler does not realize this, since the destructor is
not inlined and is lacking a fast-path. As such, the swap-based implementation
leads to an additional destructor call. `bm_exception_ptr_move_assign_nonnull`
still benefits because the swap-based move constructor avoids unnecessary
__cxa_{in,de}crement_refcount calls. As soon as we inline the destructor, this
regression should disappear again.

Works towards #44892</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds move constructor, move assignment and `swap`
to `exception_ptr`. Adding those operators allows us to avoid
unnecessary calls to `__cxa_{inc,dec}rement_refcount`.

Performance results (from libc++'s CI):

```
Benchmark                               Baseline    Candidate    Difference    % Difference
------------------------------------  ----------  -----------  ------------  --------------
bm_exception_ptr_copy_assign_nonnull        9.77         9.94          0.18           1.79%
bm_exception_ptr_copy_assign_null          10.29        10.65          0.35           3.42%
bm_exception_ptr_copy_ctor_nonnull          7.02         7.01         -0.01          -0.13%
bm_exception_ptr_copy_ctor_null            10.54        10.60          0.06           0.56%
bm_exception_ptr_move_assign_nonnull       16.92        13.76         -3.16         -18.70%
bm_exception_ptr_move_assign_null          10.61        10.76          0.14           1.36%
bm_exception_ptr_move_ctor_nonnull         13.31        10.25         -3.06         -23.02%
bm_exception_ptr_move_ctor_null            10.28         7.30         -2.98         -28.95%
bm_exception_ptr_swap_nonnull              19.22         0.63        -18.59         -96.74%
bm_exception_ptr_swap_null                 20.02         7.79        -12.23         -61.07%
```

As expected, the `bm_exception_ptr_copy_*` benchmarks are not influenced by
this change. `bm_exception_ptr_move_*` benefits between 18% and 30%. The
`bm_exception_ptr_swap_*` tests show the biggest improvements since multiple
calls to the copy constructor are replaced by a simple pointer swap.

While `bm_exception_ptr_move_assign_null` did not show a regression in the CI
measurements, local measurements showed a regression from 3.98 to 4.71, i.e. by
18%. This is due to the additional `__tmp` inside `operator=`. The destructor
of `__other` is a no-op after the move because `__other.__ptr` will be a
nullptr. However, the compiler does not realize this, since the destructor is
not inlined and is lacking a fast-path. As such, the swap-based implementation
leads to an additional destructor call. `bm_exception_ptr_move_assign_nonnull`
still benefits because the swap-based move constructor avoids unnecessary
__cxa_{in,de}crement_refcount calls. As soon as we inline the destructor, this
regression should disappear again.

Works towards #44892</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] P2641R4: Checking if a `union` alternative is active (`std::is_within_lifetime`) (#165243)</title>
<updated>2025-11-02T09:30:31+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-11-02T09:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2527b071ba2e39fdd62eeb73b89318468595c316'/>
<id>2527b071ba2e39fdd62eeb73b89318468595c316</id>
<content type='text'>
&lt;https://wg21.link/P2641R4&gt;

Implements the C++26 function in `&lt;type_traits&gt;` [meta.const.eval] (and
the corresponding feature test macro `__cpp_lib_is_within_lifetime`)

```c++
template&lt;class T&gt;
  consteval bool is_within_lifetime(const T*) noexcept;
```

This is done with the `__builtin_is_within_lifetime` builtin added to
Clang 20 by #91895 / 2a07509c8d3c8b5b2c88e4f73dde0071bf506870. This is
not (currently) available with GCC.

This implementation has provisions for LWG4138
&lt;https://cplusplus.github.io/LWG/issue4138&gt; where it is ill-formed to
instantiate `is_within_lifetime&lt;T&gt;` with a function type `T`.

Closes #105381

Co-authored-by: Mital Ashok &lt;mital@mitalashok.co.uk&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&lt;https://wg21.link/P2641R4&gt;

Implements the C++26 function in `&lt;type_traits&gt;` [meta.const.eval] (and
the corresponding feature test macro `__cpp_lib_is_within_lifetime`)

```c++
template&lt;class T&gt;
  consteval bool is_within_lifetime(const T*) noexcept;
```

This is done with the `__builtin_is_within_lifetime` builtin added to
Clang 20 by #91895 / 2a07509c8d3c8b5b2c88e4f73dde0071bf506870. This is
not (currently) available with GCC.

This implementation has provisions for LWG4138
&lt;https://cplusplus.github.io/LWG/issue4138&gt; where it is ill-formed to
instantiate `is_within_lifetime&lt;T&gt;` with a function type `T`.

Closes #105381

Co-authored-by: Mital Ashok &lt;mital@mitalashok.co.uk&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][ranges] P3060R3: Add `std::views::indices(n)` (#146823)</title>
<updated>2025-10-06T15:13:25+00:00</updated>
<author>
<name>Hristo Hristov</name>
<email>hghristov.rmm@gmail.com</email>
</author>
<published>2025-10-06T15:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45c41247f82e5691425542de829d568cdc2fb580'/>
<id>45c41247f82e5691425542de829d568cdc2fb580</id>
<content type='text'>
Implements [P3060R3](https://wg21.link/P3060R3)

Closes #148175

# References

- https://github.com/cplusplus/draft/issues/7966
- https://github.com/cplusplus/draft/pull/8006
- https://wg21.link/customization.point.object
- https://wg21.link/range.iota.overview
- https://wg21.link/ranges.syn

---------

Co-authored-by: Hristo Hristov &lt;zingam@outlook.com&gt;
Co-authored-by: A. Jiang &lt;de34@live.cn&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements [P3060R3](https://wg21.link/P3060R3)

Closes #148175

# References

- https://github.com/cplusplus/draft/issues/7966
- https://github.com/cplusplus/draft/pull/8006
- https://wg21.link/customization.point.object
- https://wg21.link/range.iota.overview
- https://wg21.link/ranges.syn

---------

Co-authored-by: Hristo Hristov &lt;zingam@outlook.com&gt;
Co-authored-by: A. Jiang &lt;de34@live.cn&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Implement P3168R2: Give optional range support (#149441)</title>
<updated>2025-08-18T15:04:45+00:00</updated>
<author>
<name>William Tran-Viet</name>
<email>wtranviet@proton.me</email>
</author>
<published>2025-08-18T15:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1c5188692036c51123ae78e9208d5a375d28f74a'/>
<id>1c5188692036c51123ae78e9208d5a375d28f74a</id>
<content type='text'>
Resolves #105430

- Implement all required pieces of P3168R2
- Leverage existing `wrap_iter` and `bounded_iter` classes to implement
the `optional` regular and hardened iterator type, respectively
- Update documentation to match</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves #105430

- Implement all required pieces of P3168R2
- Leverage existing `wrap_iter` and `bounded_iter` classes to implement
the `optional` regular and hardened iterator type, respectively
- Update documentation to match</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][ranges] implement `std::ranges::zip_transform_view` (#79605)</title>
<updated>2025-07-20T08:13:59+00:00</updated>
<author>
<name>Hui</name>
<email>hui.xie1990@gmail.com</email>
</author>
<published>2025-07-20T08:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d344c383e20a7e2cc05d947855e818d98b889ee9'/>
<id>d344c383e20a7e2cc05d947855e818d98b889ee9</id>
<content type='text'>
Fixes #104977
Fixes #105035

---------

Co-authored-by: Louis Dionne &lt;ldionne.2@gmail.com&gt;
Co-authored-by: A. Jiang &lt;de34@live.cn&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #104977
Fixes #105035

---------

Co-authored-by: Louis Dionne &lt;ldionne.2@gmail.com&gt;
Co-authored-by: A. Jiang &lt;de34@live.cn&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] P2655R3 common_reference_t of reference_wrapper Should Be a Reference Type (#141408)</title>
<updated>2025-07-06T16:32:59+00:00</updated>
<author>
<name>Hui</name>
<email>hui.xie1990@gmail.com</email>
</author>
<published>2025-07-06T16:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0d1e5ab2fd9cf9c48d60176391624544d2e2242c'/>
<id>0d1e5ab2fd9cf9c48d60176391624544d2e2242c</id>
<content type='text'>
Fixes #105260

This patch applies the change as a DR to C++20. The rationale is that
the paper is more like a bug fix. It does not introduce new features, it
simply changes an existing behaviour (as a bug fix). MSVC STL DRed this
paper to C++20 as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #105260

This patch applies the change as a DR to C++20. The rationale is that
the paper is more like a bug fix. It does not introduce new features, it
simply changes an existing behaviour (as a bug fix). MSVC STL DRed this
paper to C++20 as well.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Implement `views::join_with` (#65536)</title>
<updated>2025-06-21T09:54:50+00:00</updated>
<author>
<name>Jakub Mazurkiewicz</name>
<email>mazkuba3@gmail.com</email>
</author>
<published>2025-06-21T09:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1bb2328fd3adf137cb32af4e3722a1b3e8a53a8e'/>
<id>1bb2328fd3adf137cb32af4e3722a1b3e8a53a8e</id>
<content type='text'>
* Implement "P2441R2 `views::join_with`" (https://wg21.link/P2441R2),
closes #105185
* Implement LWG4074 (https://wg21.link/LWG4074), closes #105346
* Complete implementation of "P2711R1 Making multi-param constructors of
views explicit" (https://wg21.link/P2711R1), closes #105252
* Complete implementation of "P2770R0 Stashing stashing iterators for
proper flattening" (https://wg21.link/P2770R0), closes #105250</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Implement "P2441R2 `views::join_with`" (https://wg21.link/P2441R2),
closes #105185
* Implement LWG4074 (https://wg21.link/LWG4074), closes #105346
* Complete implementation of "P2711R1 Making multi-param constructors of
views explicit" (https://wg21.link/P2711R1), closes #105252
* Complete implementation of "P2770R0 Stashing stashing iterators for
proper flattening" (https://wg21.link/P2770R0), closes #105250</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Implement P2897R7 aligned_accessor: An mdspan accessor expressing pointer over-alignment (#122603)</title>
<updated>2025-04-14T21:33:57+00:00</updated>
<author>
<name>Damien L-G</name>
<email>dalg24@gmail.com</email>
</author>
<published>2025-04-14T21:33:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=557e931d958104eb5d11b93ad3a21e4017812fcd'/>
<id>557e931d958104eb5d11b93ad3a21e4017812fcd</id>
<content type='text'>
Closes #118372</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #118372</pre>
</div>
</content>
</entry>
</feed>
