Restore disabled check for #3070 (except on MSVC) #3421
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fromjson
results in an ambiguous overload resolution becausefs::path
can be constructed from both astd::string
as well as anotherfs::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 withjson
implicitly converting to bothstd::string
andfs::path
.Re-enabling the check where it compiles and keeping it disabled for MSVC is the best we can do.
Closes #3377 and #3382.