From 98ebefe36001f2aa3ce95f8c2ab41ea32820d913 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 28 Mar 2024 08:52:58 +0100 Subject: [PATCH] P2810R4 is_debugger_present is_replaceable --- source/lib-intro.tex | 7 +++++++ source/support.tex | 2 +- source/utilities.tex | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 761c2be14c..90833ff41c 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -3309,6 +3309,13 @@ operator delete[](void*, std::align_val_t, const std::nothrow_t&) \end{codeblock} +\pnum +A \Cpp{} program may provide the definition of +the following function signature declared in header \libheaderref{debugging}: +\begin{codeblock} +bool std::is_debugger_present() noexcept +\end{codeblock} + \pnum The program's definitions are used instead of the default versions supplied by the implementation\iref{new.delete}. diff --git a/source/support.tex b/source/support.tex index d2aef843d3..e0ab97c30b 100644 --- a/source/support.tex +++ b/source/support.tex @@ -622,7 +622,7 @@ // \libheader{deque}, \libheader{queue}, \libheader{stack}, \libheader{string} #define @\defnlibxname{cpp_lib_copyable_function}@ 202306L // also in \libheader{functional} #define @\defnlibxname{cpp_lib_coroutine}@ 201902L // also in \libheader{coroutine} -#define @\defnlibxname{cpp_lib_debugging}@ 202311L // freestanding, also in \libheader{debugging} +#define @\defnlibxname{cpp_lib_debugging}@ 202403L // freestanding, also in \libheader{debugging} #define @\defnlibxname{cpp_lib_destroying_delete}@ 201806L // freestanding, also in \libheader{new} #define @\defnlibxname{cpp_lib_enable_shared_from_this}@ 201603L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_endian}@ 201907L // freestanding, also in \libheader{bit} diff --git a/source/utilities.tex b/source/utilities.tex index e5f8d8a4b7..6c0444e479 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -19320,9 +19320,18 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\replaceable +A \Cpp{} program may define a function with this function signature, and +thereby displace the default version defined by the \Cpp{} standard library. + +\pnum +\required +This function has no preconditions. \pnum -The semantics of this function are \impldef{semantics of \tcode{is_debugger_present}}. +\default +\impldef{default semantics of \tcode{is_debugger_present}}. \begin{note} When tracing the execution of a program with a debugger, an implementation