Skip to content

P2810R4 is_debugger_present is_replaceable #6912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2024
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
7 changes: 7 additions & 0 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
Expand Down
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
11 changes: 10 additions & 1 deletion source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down