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:
using ReturnType = typename std::result_of<MethodPtr(Class*)>::type;
should be replaced with:
using ReturnType = typename std::invoke_result_t<MethodPtr, Class*>;
That code has already been replaced in https://github.com/google/googletest/commit/61f010d703b32de9bfb20ab90ece38ab2f25977f
@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?
Most helpful comment
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