Skip to content

Commit

Permalink
Googletest export
Browse files Browse the repository at this point in the history
Do not use std::result_of as it was removed in C++20.

PiperOrigin-RevId: 303783600
  • Loading branch information
Abseil Team authored and suertreus committed Mar 31, 2020
1 parent dc82a33 commit 61f010d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion googlemock/include/gmock/gmock-actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,8 @@ struct InvokeMethodWithoutArgsAction {
Class* const obj_ptr;
const MethodPtr method_ptr;

using ReturnType = typename std::result_of<MethodPtr(Class*)>::type;
using ReturnType =
decltype((std::declval<Class*>()->*std::declval<MethodPtr>())());

template <typename... Args>
ReturnType operator()(const Args&...) const {
Expand Down

0 comments on commit 61f010d

Please sign in to comment.