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

Add some debug mode for detecting misusages at runtime #134

Open
akrzemi1 opened this issue Feb 6, 2018 · 1 comment
Open

Add some debug mode for detecting misusages at runtime #134

akrzemi1 opened this issue Feb 6, 2018 · 1 comment

Comments

@akrzemi1
Copy link
Collaborator

akrzemi1 commented Feb 6, 2018

Provide some debug mode, like when some custom macro like BOOST_OUTCOME_DEBUG_MODE is defined, where result and outcome at the cost of run-time size or efficiency track whether the failure status (has_value()) has been checked before the object is destroyed of unsafely accessed (with assume_value()).

@ned14 ned14 added this to the Outcome v2 review milestone Feb 6, 2018
@ned14
Copy link
Owner

ned14 commented Feb 6, 2018

I'm still not convinced that this actually useful in practice. I think people think it would be useful, without evidence. But then I do have two status bits free (I thought I only had one), and I want to keep a status bit free going into the future in case they improve language support for detecting failure to observe these objects. So I now see no reason not to use a bit for this, it could be useful I suppose.

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

No branches or pull requests

2 participants