Fields

hardware None
os None

Parameters

Fields

NameValue

Parameters

NameValue
git_commit commit 2527b071ba2e39fdd62eeb73b89318468595c316
Author: Nikolas Klauser <nikolasklauser@berlin.de>
Date: Sun Nov 2 10:30:31 2025 +0100

[libc++] P2641R4: Checking if a `union` alternative is active (`std::is_within_lifetime`) (#165243)

<https://wg21.link/P2641R4>

Implements the C++26 function in `<type_traits>` [meta.const.eval] (and
the corresponding feature test macro `__cpp_lib_is_within_lifetime`)

```c++
template<class T>
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
<https://cplusplus.github.io/LWG/issue4138> where it is ill-formed to
instantiate `is_within_lifetime<T>` with a function type `T`.

Closes #105381

Co-authored-by: Mital Ashok <mital@mitalashok.co.uk>
Filter

ldionne-old-macbook-results test results

Run Order Start Time Duration
Current 557914 2025-12-16T16:40:01 0:00:00
Previous 557913 2025-12-16T16:40:01 0:00:00
Baseline 485288 2025-12-16T16:40:01 0:00:00


Tests Summary

Status Group # # (B)
Performance Regressions 5 0
Performance Improvements 1 0
Added Tests 0 16
Unchanged Tests 74 64
Total Tests 80

Performance Regressions - execution_time Δ Previous Current σ Δ (B) σ (B)
753_ns3_r 2.39% 9.986 10.224 - 0.00% -
706_stockfish_r 1.67% 21.559 21.919 - 0.00% -
729_abc_r 1.55% 18.667 18.957 - 0.00% -
750_sealcrypto_r 1.16% 18.517 18.732 - 0.00% -
707_ntest_r 1.03% 16.482 16.651 - 0.00% -

Performance Improvements - execution_time Δ Previous Current σ Δ (B) σ (B)
710_omnetpp_r -1.68% 8.591 8.447 - 0.00% -

Added Tests - execution_time
706_stockfish_r
707_ntest_r
709_cactus_r
710_omnetpp_r
721_gcc_r
723_llvm_r
727_cppcheck_r
729_abc_r
731_astcenc_r
735_gem5_r
736_ocio_r
737_gmsh_r
748_flightdm_r
750_sealcrypto_r
753_ns3_r
766_femflow_r


Report Time: 0.15s
Name Current %
706_stockfish_r 21.919 1.67%
707_ntest_r 16.651 1.03%
709_cactus_r 19.734 -
710_omnetpp_r 8.447 -1.68%
721_gcc_r 12.969 -
723_llvm_r 11.523 -
727_cppcheck_r 24.981 -
729_abc_r 18.957 1.55%
731_astcenc_r 10.075 -
735_gem5_r 13.365 -
736_ocio_r 16.212 -
737_gmsh_r 12.898 -
748_flightdm_r 8.889 -
750_sealcrypto_r 18.732 1.16%
753_ns3_r 10.224 2.39%
766_femflow_r 12.810 -
Geometric Mean 14.171 -