-
Notifications
You must be signed in to change notification settings - Fork 7
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
remove exceptions #23
base: kp/job-manager
Are you sure you want to change the base?
Conversation
Integration test is working with the latest release of ros2 iron, but the docker images are not updated yet. |
Could you merge the latest main into the base branch also rebase/update this branch? |
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
33ec5cf
to
7e83337
Compare
Signed-off-by: Luca Della Vedova <[email protected]>
abdd73f
to
b85cc40
Compare
I'm wondering, especially now that we bumped main to 24.04 and all the compiler versions are fairly recent, would it make sense to increase our C++ standard to C++23 and use std::expected rather than manually implementing our own |
Signed-off-by: Luca Della Vedova <[email protected]>
I'm down for that |
This is a preview of the work in removing exceptions.
Inspired from rust,
Result<T>
is the alternative to exceptions. Internally it usesstd::variant
to store either the result or astd::exception
.[[nodiscard]]
should almost always be used when returningResult<T>
. We don't have custom lint rules so it will have to be checked manually.Result<void>
is a special case that usingstd::optional
instead.Result<T&>
does not work becausestd::variant
cannot contain references.Result<T>
for all reference types and store a pointer internally instead.