title: Why does Google Mocks find this function call ambiguous?
body: <p>I've run into an issue while attempting to start using Google Mocks - for some reason it can't tell the call I'm specifying in the <code>EXPECT_CALL</code> macro, even though the types are consistent.  I want to know why it doesn't just match the first function, and what I need to do/add to make it match the first function.</p>
  
  <p>The mock class:</p>
  
  <pre><code>class GMockTest : public ITest
  {
  public:
  MOCK_METHOD2(SetParameter,
      int(int nParameter, double value));
  MOCK_METHOD2(SetParameter,
      int(int nParameter, int value));
  MOCK_METHOD2(SetParameter,
      int(int nParameter, __int64 value));
  }
  </code></pre>
  
  <p>The test code that throws the error:</p>
  
  <pre><code>__int64 nFrom = 0,
      nTo = 0;
  
  EXPECT_CALL(mock, SetParameter(2, nFrom))
      .Times(1)
      .WillOnce(Return(0));
  EXPECT_CALL(mock, SetParameter(3, nTo))
      .Times(1)
      .WillOnce(Return(0));
  </code></pre>
  
  <p>The compilation error:</p>
  
  <pre><code>test.cpp(1343) : error C2668: GMockTest::gmock_SetParameter' : ambiguous call to overloaded function
          testmocks.h(592): could be 'testing::internal::MockSpec&lt;F&gt; 
   &amp;GMockTest::gmock_SetParameter(const testing::Matcher&lt;T&gt; &amp;,const testing::Matcher&lt;A2&gt; &amp;)
  '
          with
          [
              F=int (int,__int64),
              T=int,
              A2=__int64
          ]
          testmocks.h(590): or       'testing::internal::MockSpec&lt;F&gt;  
  &amp;GMockTest::gmock_SetParameter(const testing::Matcher&lt;T&gt; &amp;,const testing::Matcher&lt;T&gt; &amp;)'
  
          with
          [
              F=int (int,int),
              T=int
          ]
          testmocks.h(580): or       'testing::internal::MockSpec&lt;F&gt; 
  &amp;GMockTest::gmock_SetParameter(const testing::Matcher&lt;T&gt; &amp;,const testing::Matcher&lt;FloatT
  ype&gt; &amp;)'
          with
          [
              F=int (int,double),
              T=int,
              FloatType=double
          ]
          while trying to match the argument list '(int, __int64)'
  </code></pre>