title: GMock - returning default value with ON_CALL for overloaded methods
body: <p>I'm trying to write mock for a class which contains three overloaded methods, ie.:</p>
  
  <pre><code>#include &lt;gtest/gtest.h&gt;
  #include &lt;gmock/gmock.h&gt;
  
  using ::testing::_;
  using ::testing::Return;
  using ::testing::A;
  using ::testing::ByRef;
  using ::testing::Ref;
  using ::testing::TypedEq;
  
  struct Foo {
    int fooMethod(const int&amp; intParam) { return 0; }
    int fooMethod(const float&amp; floatParam) { return 0; }
    int fooMethod(const std::string&amp; stringParam) { return 0; }
  };
  
  struct FooMock {
    FooMock() {
      ON_CALL(*this, fooMethod(_)).WillByDefault(Return(-1));
    }
  
    MOCK_METHOD1(fooMethod, int(const int&amp; intParam));
    MOCK_METHOD1(fooMethod, int(const float&amp; floatParam));
    MOCK_METHOD1(fooMethod, int(const std::string&amp; stringParam));
  };
  </code></pre>
  
  <p>but this gives an error:</p>
  
  <pre><code> error: call of overloaded ‘gmock_fooMethod(const testing::internal::AnythingMatcher&amp;)’ is ambiguous
  </code></pre>
  
  <p>I've also tried TypedEq() instead of "_", but it gives more obscure errors. I've checked GMock FAQ, Wiki and I didn't find solution - how can I return default value with ON_CALL for overloaded methods?</p>
  
  <p>BR,
  Lukasz</p>