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

to/from_json: add a MSVC-specific static_assert to force a stacktrace #854

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

theodelrieu
Copy link
Contributor

Hi,

This PR add a static_assert inside from_json_fn/to_json_fn to help users understand the following message:

could not find to_json in T's namespace

Sometimes Visual Studio does not show the stacktrace, thus making it tricky to know which type is T.

Pull request checklist

@trilogy-service-ro
Copy link

Can one of the admins verify this patch?

@theodelrieu
Copy link
Contributor Author

Can one of the admins kill this bot?

@nlohmann
Copy link
Owner

nlohmann commented Dec 5, 2017

I already reported it at GitHub twice. :-(

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c9a02cb on theodelrieu:fix/force_msvc_stacktrace into f4c0160 on nlohmann:develop.

@nlohmann nlohmann added the platform: visual studio related to MSVC label Dec 5, 2017
Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@nlohmann nlohmann self-assigned this Dec 5, 2017
@nlohmann nlohmann added this to the Release 3.0.0 milestone Dec 5, 2017
@nlohmann nlohmann merged commit 0e3a0b7 into nlohmann:develop Dec 5, 2017
@nlohmann
Copy link
Owner

nlohmann commented Dec 5, 2017

Thanks!

@theodelrieu theodelrieu deleted the fix/force_msvc_stacktrace branch December 5, 2017 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants