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

Improve behaviors when disabling exceptions #134

Merged
merged 4 commits into from
Mar 15, 2015
Merged

Conversation

CarterLi
Copy link
Contributor

Functions which unconditionally throw exceptions should never return, with or without exception enabled

Tested compiler: AppleClang 6.1, brew g++-4.9 on OS X 10.10.2

# else
# define FMT_THROW(x) assert(false)
# define FMT_RETURN_AFTER_THROW(x) return x
# ifdef DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be #ifndef NDEBUG instead of #ifdef DEBUG.

@vitaut
Copy link
Contributor

vitaut commented Mar 14, 2015

Looks great, thanks. I have only two minor comments.

@CarterLi
Copy link
Contributor Author

Fixed, thanks

vitaut added a commit that referenced this pull request Mar 15, 2015
Improve behaviors when disabling exceptions
@vitaut vitaut merged commit e65e05b into fmtlib:master Mar 15, 2015
@vitaut
Copy link
Contributor

vitaut commented Mar 15, 2015

Thanks!

@vitaut
Copy link
Contributor

vitaut commented Apr 21, 2019

@CarterLi, could you please review the updated CONTIBUTING document, particularly the part about licensing, and let me know if you agree with it being applied to your contributions to {fmt}? The library is likely to be relicensed (#1073) so I'm collecting approval from all earlier contributors. Thanks!

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.

2 participants