Skip to content

Commit

Permalink
Try to not advertise optional misuse
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Apr 30, 2024
1 parent 9be9bc3 commit 2d36f27
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions doc/PIDHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,8 @@ that most of the times you will see lines like this
const auto value = pidHandler.getAlgoType("someAlgo").value();
```

This will throw an exception if some information is not available. If you want /
need to check first whether information is present you can do

```cpp
const auto maybeValue = pidHandler.getAlgoType("someAlgo");
if (maybeValue.has_value()) {
const auto value = maybeValue.value();
}
```
This will throw an exception if some information is not available. Check if the
optional has a value when actually using these utilities.

### Creating a PIDHandler for a complete event

Expand Down

0 comments on commit 2d36f27

Please sign in to comment.