This is an archive of the discontinued LLVM Phabricator instance.

Fix compilation of Google Test in C++20 mode
ClosedPublic

Authored by Godin on Dec 6 2021, 8:55 AM.

Details

Summary

Without this patch when using CMAKE_CXX_STANDARD=20
and MSVC 19.30.30705.0 compilation of unit tests
fails with

llvm\utils\unittest\googlemock\include\gmock/gmock-actions.h(828): error C2039: 'result_of': is not a member of 'std'

Patch is taken from Google Test:
https://github.com/google/googletest/commit/61f010d703b32de9bfb20ab90ece38ab2f25977f

Do not use std::result_of as it was removed in C++20.

Diff Detail

Event Timeline

Godin requested review of this revision.Dec 6 2021, 8:55 AM
Godin created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2021, 8:55 AM
bkramer accepted this revision.Dec 6 2021, 9:05 AM

Thanks

This revision is now accepted and ready to land.Dec 6 2021, 9:05 AM
This revision was landed with ongoing or failed builds.Dec 6 2021, 9:08 AM
This revision was automatically updated to reflect the committed changes.