Skip to content

Commit

Permalink
Fix gmock tests when std::unary_function unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
KindDragon committed Aug 24, 2017
1 parent 9febaba commit 01d854c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions googlemock/test/gmock-matchers_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3936,8 +3936,11 @@ TEST(ResultOfTest, WorksForFunctionReferences) {

// Tests that ResultOf(f, ...) compiles and works as expected when f is a
// function object.
struct Functor : public ::std::unary_function<int, std::string> {
result_type operator()(argument_type input) const {
struct Functor {
typedef std::string result_type;
typedef int argument_type;

std::string operator()(int input) const {
return IntToStringFunction(input);
}
};
Expand Down

0 comments on commit 01d854c

Please sign in to comment.