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

Fix string conversion under Clang #26

Merged
merged 1 commit into from
Jan 12, 2015
Merged

Fix string conversion under Clang #26

merged 1 commit into from
Jan 12, 2015

Conversation

wancw
Copy link
Contributor

@wancw wancw commented Jan 12, 2015

Explicit conversion to std::string by static_cast<> causes compilation error when using Clang (3.5).
(Casting to const std::string doesn't work either.)

This PR fixed it by removing const from the casting operator.
And I think it also makes casting operator more consistent with get<>() method.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 36f6199 on wancw:fix_clang_string_casting into bd05c7a on nlohmann:master.

@nlohmann
Copy link
Owner

Thanks a lot for fixing that!

nlohmann added a commit that referenced this pull request Jan 12, 2015
@nlohmann nlohmann merged commit dcf7174 into nlohmann:master Jan 12, 2015
GerHobbelt pushed a commit to GerHobbelt/nlohmann-json that referenced this pull request May 7, 2021
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