Skip to content
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 undefined behaviour #117

Merged
merged 3 commits into from
Feb 15, 2023

Conversation

daira
Copy link
Contributor

@daira daira commented Sep 5, 2022

Add assertions for cases where the API documents undefined behaviour. This affects operator->, operator*, and error() on a tl::expected. The performance impact is likely negligible for typical uses. refs #113

@daira
Copy link
Contributor Author

daira commented Sep 5, 2022

Note that the assertion behaviour can be overridden by defining a TL_ASSERT macro before including expected.hpp. I needed this for the tests, but it should probably also be documented. (Done, in README.md.)

@qicosmos
Copy link

Could you merge it?

daira added 2 commits December 8, 2022 20:59
This affects operator->, operator*, and error() on a tl::expected
instance. The performance impact is likely negligible for typical uses.
refs TartanLlama#113

Signed-off-by: Daira Hopwood <[email protected]>
Signed-off-by: Daira Hopwood <[email protected]>
@daira daira force-pushed the remove-undefined-behaviour branch from 57d89eb to 19e3dba Compare December 8, 2022 20:59
@daira
Copy link
Contributor Author

daira commented Dec 8, 2022

I've rebased this to current master.

daira added a commit to daira/tl-docs that referenced this pull request Dec 9, 2022
@centromere
Copy link

Hi @TartanLlama. Are you available to give this a review?

@TartanLlama TartanLlama merged commit 79a2068 into TartanLlama:master Feb 15, 2023
@daira daira deleted the remove-undefined-behaviour branch February 16, 2023 19:31
@daira
Copy link
Contributor Author

daira commented Feb 16, 2023

Note that TartanLlama/tl-docs#4 is a related doc change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants