Skip to content

Re-add JSONCPP_NORETURN replacing [[noreturn]] #1041

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

Merged
merged 1 commit into from Oct 11, 2019
Merged

Re-add JSONCPP_NORETURN replacing [[noreturn]] #1041

merged 1 commit into from Oct 11, 2019

Conversation

ghost
Copy link

@ghost ghost commented Oct 6, 2019

Restores Visual Studio 2013 compatibility.

Fixes Visual Studio 2013 compatibility.
@dota17
Copy link
Member

dota17 commented Oct 8, 2019

Can you post more info?
I am wondering the errors or other messages about the Visual Studio 2013 compatibility.

@ghost
Copy link
Author

ghost commented Oct 8, 2019

The [[noreturn]] clause causes the following compilation errors, apparently as a result of incomplete C++11 support:
Capture

@dota17
Copy link
Member

dota17 commented Oct 11, 2019

When I used VS 2013 to build, I got the same result.
The problem is that the newest code which include [[noreturn]] requires more C++11 features, but VS 2013 doesn't support C++11 attributes feature.
Related Solution Link: C3409

According to the git history, in the commit 408b466b, the test for Visual Studio 12 2013 had been removed.
Maybe there are some other places/commits that require more C++11 features.

And I found some places that we may need to change if we do not re-add JSONCPP_NORETURN.
etc, in include/json/config.h

#if defined(_MSC_VER) && _MSC_VER < 1800
#error                                                                         \
    "ERROR:  Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities"
#endif

Maybe Visual Studio 12 (2013) with _MSC_VER=1800 is not the oldest anymore.

@baylesj
Copy link
Contributor

baylesj commented Oct 11, 2019

I think the value add of dropping a macro is not worth dropping support for your IDE. I'll look at adding more CI coverage.

@baylesj baylesj merged commit 2ee3b1d into open-source-parsers:master Oct 11, 2019
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.

3 participants