Landing: 4442e8b6cbff

Project / Subsystem

gcc / libstdc++,testsuite

Date

2026-09-14

Author

Jakub Jelinek

Commit

4442e8b6cbffd113ec7bd25f449cc18f104f7150

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++,testsuite
patch_id
—
commit_hash
4442e8b6cbffd113ec7bd25f449cc18f104f7150
source_type
github
headline
Implement C++26 std::is_within_lifetime extension.
tldr
C++26 `std::is_within_lifetime` is now implemented in libstdc++ using compiler built-ins.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libstdc++
  • • c++26
  • • compiler
  • • type traits
  • • UB
discussion_id_link
—
bugzilla_pr
—
date
2026-09-14T00:00:00.000Z

GCC’s libstdc++ now implements the C++26 proposal P3450R1, which extends std::is_within_lifetime. This implementation uses __builtin_constant_p to determine if a static_cast mandated by the standard can be evaluated as a constant expression. New test cases verify this functionality.