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 PICOJSON_DISABLE_EXCEPTION macro switch to support -fno-exceptions #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhysd
Copy link

@rhysd rhysd commented May 28, 2019

Fixes #117

For supporting -fno-exceptions compiler option, this patch adds PICOJSON_DISABLE_EXCEPTION preprocessor macro switch. When it is defined, picojson utilizes std::abort instead of throw.

I confirmed picojson.h can be compiled with clang++ -fno-exception with this patch and all tests passed by make test.

@rhysd rhysd changed the title Add $PICOJSON_DISABLE_EXCEPTION to support -fno-exceptions Add PICOJSON_DISABLE_EXCEPTION macro switch to support -fno-exceptions May 28, 2019
@ajtulloch
Copy link

Looks good IMO, this would be useful for some cases I'm interested in.

@kripton
Copy link

kripton commented Jun 20, 2021

@kazuho : Anything blocking to get this merged?

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.

picojson does not support -fno-exceptions
3 participants