C++ Logo

sg15

Advanced search

Re: [SG15] breakpoint and is_debugger_present proposals.

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Wed, 5 Jan 2022 07:10:56 -0500
On Wed, Jan 05, 2022 at 08:10:08 +0000, Jonathan Wakely via SG15 wrote:
> Maybe give it a default argument too. The difficulty then is whether it
> should default to true or false, and whether true should mean conditional
> or unconditional.

Why are we limited to `bool`? Why not something like:

```
enum class breakport_condition {
    always,
    when_debugged, // best effort
    never, // to allow for more complicated conditional logic leading up to the call
};
```

The discussion of the default is then down to just `always` or
`when_debugged`, no?

--Ben

Received on 2022-01-05 06:11:01