diff options
| author | Nikolas Klauser <nikolasklauser@berlin.de> | 2025-11-02 10:30:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-02 10:30:31 +0100 |
| commit | 2527b071ba2e39fdd62eeb73b89318468595c316 (patch) | |
| tree | 12ecb7c4753fb06fcc3c46772af9d9e7b7491e95 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h | |
| parent | f46ac9234f1c98b6b1f63672ff6ff363874c7f51 (diff) | |
| download | llvm-2527b071ba2e39fdd62eeb73b89318468595c316.zip llvm-2527b071ba2e39fdd62eeb73b89318468595c316.tar.gz llvm-2527b071ba2e39fdd62eeb73b89318468595c316.tar.bz2 | |
[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>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h')
0 files changed, 0 insertions, 0 deletions
