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

Reproducing #3377 #3382

Closed
wants to merge 1 commit into from
Closed

Reproducing #3377 #3382

wants to merge 1 commit into from

Conversation

nlohmann
Copy link
Owner

@nlohmann nlohmann commented Mar 8, 2022

PR to reproduce #3377.

@nlohmann nlohmann marked this pull request as draft March 8, 2022 12:50
falbrechtskirchinger added a commit to falbrechtskirchinger/json that referenced this pull request Apr 5, 2022
falbrechtskirchinger added a commit to falbrechtskirchinger/json that referenced this pull request Apr 5, 2022
Restore the previously disabled check for regression nlohmann#3070 on all
compilers but MSVC.

To summarize the issue:
Given namespace fs = std::filesystem.
On MSVC attempting to construct an fs::path from json results in an
ambiguous overload resolution because fs::path can be constructed from
both a std::string as well as another fs::path.
To the best of my knowledge there is no way to fix an ambiguous overload
situation involving a type we do not control and with json implicitly
converting to both std::string and fs::path.

Re-enabling the check where it compiles and keeping it disabled for MSVC
is the best we can do.

Closes nlohmann#3377 and nlohmann#3382.
nlohmann pushed a commit that referenced this pull request Apr 6, 2022
Restore the previously disabled check for regression #3070 on all
compilers but MSVC.

To summarize the issue:
Given namespace fs = std::filesystem.
On MSVC attempting to construct an fs::path from json results in an
ambiguous overload resolution because fs::path can be constructed from
both a std::string as well as another fs::path.
To the best of my knowledge there is no way to fix an ambiguous overload
situation involving a type we do not control and with json implicitly
converting to both std::string and fs::path.

Re-enabling the check where it compiles and keeping it disabled for MSVC
is the best we can do.

Closes #3377 and #3382.
@nlohmann nlohmann closed this Apr 6, 2022
@nlohmann nlohmann deleted the issue3377_test_never_executed branch April 6, 2022 06:25
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.

1 participant