-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
std::result_of is removed in C++20 #2914
Comments
That code has already been replaced in 61f010d |
@sbenzaquen Is there any timeline for an official release that contains this fix? |
I need this fix too - getting this error C2039: 'result_of': is not a member of 'std' when compiling with Visual Studio 2019 16.7.2 for googletest-release-1.10.0 |
Is there any plan to release a new version of googletest in the near future where this problem is solved? |
As C++20 is now officially approved it would be time to have that released. |
Hi, also adding to this. Waiting on this release w/ the fix. |
I had this issue and resolved it after upgrading to v1.11.0, so I think the fix landed in that release. |
libc++13 has better support for ranges. To enable the upgrade, downgrade the devcontainer to Ubuntu Bionic, since the previous version was introducing dependency issues because it uses libpython3.9, and the liblldb package for some reason has a dependency on libpython3.8, which cannot be resolved. Note that this is two versions back, since this is the only other one that also supports arm64 for M1 macs. Also upgrade gtest to v1.11.0, since the previous version was relying on a the deprecated `std::result_of` API, which is removed in C++20. This version of libc++ removes the API. See google/googletest#2914
std::result_of is removed in C++20, causing gmock-actions.h:819 to fail in Visual Studio 2019 16.6.2 with C++20 enabled. However std::invoke_result is available since C++17.
For C++20:
should be replaced with:
The text was updated successfully, but these errors were encountered: