Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions source/meta.tex
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@

// \ref{meta.const.eval}, constant evaluation context
constexpr bool is_constant_evaluated() noexcept;
consteval bool is_within_lifetime(const auto*) noexcept;
template<class U = void, class T>
consteval bool is_within_lifetime(const T*) noexcept;
}
\end{codeblock}

Expand Down Expand Up @@ -2581,14 +2582,21 @@

\indexlibraryglobal{is_within_lifetime}%
\begin{itemdecl}
consteval bool is_within_lifetime(const auto* p) noexcept;
template<class U = void, class T>
consteval bool is_within_lifetime(const T* p) noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\mandates
\tcode{static_cast<const volatile U*>(p)} is well-formed.

\pnum
\returns
\tcode{true} if \tcode{p} is a pointer to an object that is
within its lifetime\iref{basic.life}; otherwise, \tcode{false}.
within its lifetime\iref{basic.life} and
\tcode{static_cast<const volatile U*>(p)} is a constant subexpression;
otherwise, \tcode{false}.

\pnum
\remarks
Expand Down
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@
#define @\defnlibxname{cpp_lib_is_sufficiently_aligned}@ 202411L // freestanding, also in \libheader{memory}
#define @\defnlibxname{cpp_lib_is_swappable}@ 201603L // freestanding, also in \libheader{type_traits}
#define @\defnlibxname{cpp_lib_is_virtual_base_of}@ 202406L // freestanding, also in \libheader{type_traits}
#define @\defnlibxname{cpp_lib_is_within_lifetime}@ 202306L // freestanding, also in \libheader{type_traits}
Comment thread
tkoeppe marked this conversation as resolved.
#define @\defnlibxname{cpp_lib_is_within_lifetime}@ 202603L // freestanding, also in \libheader{type_traits}
#define @\defnlibxname{cpp_lib_jthread}@ 201911L // also in \libheader{stop_token}, \libheader{thread}
#define @\defnlibxname{cpp_lib_latch}@ 201907L // also in \libheader{latch}
#define @\defnlibxname{cpp_lib_launder}@ 201606L // freestanding, also in \libheader{new}
Expand Down
Loading