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

Use __cpp_lib_is_invocable instead of __cplusplus. #282

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

Som1Lse
Copy link
Contributor

@Som1Lse Som1Lse commented Dec 20, 2021

The fix for std::result_of being removed in C++20 checks __cplusplus, which isn't always set in MSVC, which also happens to be the compiler that removed std::result_of, so it adds /Zc:__cplusplus to the command line to fix this. This creates another problem however: When using the package in Clang, which doesn't support /Zc:__cplusplus, you get an error and it doesn't work. This is a problem for vcpkg#22100.

The solution is to use the feature test macro __cpp_lib_is_invocable instead, which tests exactly what we want to know.

@emil-e emil-e merged commit 08b5058 into emil-e:master Dec 20, 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.

2 participants