title: std::pair argument in Google Mocked member function fails to compile
body: <p>I have a one method interface and a class mocking that interface. The method takes a single argument. Only when that argument is of type <code>std::pair&lt;Something, Something&gt;</code> does it fail to compile. I'm working with MSVC 2010, so it is possible the issue is compiler or STL implementation specific, unless, of course, the problem is wetware related, which is my best guess. I must be missing something obvious. Like nanoprobes.</p>
  
  <pre><code>#include &lt;gmock/gmock.h&gt;
  
  class BorgInterface
  {
  public:
      typedef std::pair&lt;int, long&gt; MyBorg; // &lt;--- MyBorg is problematic!
      //typedef long MyBorg; // ..but this MyBorg complies
      virtual void Assimilate( MyBorg borg_in_training ) = 0;
  };
  
  class MockBorg
      : public BorgInterface
  {
  public:
      MOCK_METHOD1( Assimilate, void( BorgInterface::MyBorg borg_in_training ));
  };
  
  /*TEST( MyBorgTestCase, BorgInterfaceTest )
  {
      using ::testing::_;
  
      MockBorg funny_borg;
      EXPECT_CALL( funny_borg, Assimilate( _ ));
      // ...etc. (irrelevant)
  }*/
  </code></pre>
  
  <p>The actual test case does not have to be uncommented for the error to manifest itself.</p>
  
  <p>For now, I work around this issue by wrapping the <code>std::pair&lt;&gt;</code> in a <code>struct</code>, but this is sub-optimal.</p>
  
  <p>The length of the error message is rather unfortunate, but it may help:</p>
  
  <pre><code>1&gt;Build started 3/31/2012 4:02:43 PM.
  1&gt;ClCompile:
  1&gt;  test_pair_parameter_mock.cpp
  1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\tuple(127):
     error C2664: 'std::pair&lt;_Ty1,_Ty2&gt;::pair(const std::pair&lt;_Ty1,_Ty2&gt; &amp;)'
         : cannot convert parameter 1 from 'int' to 'const std::pair&lt;_Ty1,_Ty2&gt; &amp;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Ty1=int,
  1&gt;              _Ty2=long
  1&gt;          ]
  1&gt;          Reason: cannot convert from 'int' to 'const std::pair&lt;_Ty1,_Ty2&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Ty1=int,
  1&gt;              _Ty2=long
  1&gt;          ]
  1&gt;          No constructor could take the source type,
               or constructor overload resolution was ambiguous
  1&gt;          c:\...\microsoft visual studio 10.0\vc\include\tuple(404)
                 : see reference to function template instantiation
                  'std::tr1::_Cons_node&lt;_Car,_Cdr&gt;::_Cons_node&lt;
                    _Ty1&amp;,_Ty2&amp;,std::tr1::_Nil&amp;,std::tr1::_Nil&amp;,
                    std::tr1::_Nil&amp;,
                    ...............
                    std::tr1::_Nil&amp;,
                    std::tr1::_Nil&amp;&gt;(_Farg0,...,_Farg9)' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              _Car=BorgInterface::MyBorg,
  1&gt;              _Cdr=std::tr1::_Tuple_type&lt;
                    std::tr1::_Nil,
                    ..............
                    std::tr1::_Nil,
                    std::tr1::_Nil&gt;::_Type,
  1&gt;              _Ty1=int,
  1&gt;              _Ty2=long,
  1&gt;              _Farg0=int &amp;,
  1&gt;              _Farg1=long &amp;,
  1&gt;              _Farg2=std::tr1::_Nil &amp;,
  1&gt;              .......................
  1&gt;              _Farg9=std::tr1::_Nil &amp;
  1&gt;          ]
  1&gt;          d:\...\gmock\include\gmock\gmock-generated-function-mockers.h(97) :
                  see reference to function template instantiation
                   'std::tr1::tuple&lt;_Arg0&gt;::tuple&lt;int,long&gt;(
                     std::pair&lt;_Ty1,_Ty2&gt; &amp;)' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              _Arg0=BorgInterface::MyBorg,
  1&gt;              _Ty1=int,
  1&gt;              _Ty2=long
  1&gt;          ]
  1&gt;          d:\...\gmock\include\gmock\gmock-generated-function-mockers.h(92) :
                 while compiling class template member function
                  'void testing::internal::FunctionMocker&lt;Function&gt;::Invoke(A1)'
  1&gt;          with
  1&gt;          [
  1&gt;              Function=void (BorgInterface::MyBorg),
  1&gt;              A1=BorgInterface::MyBorg
  1&gt;          ]
  1&gt;          d:\..\myapp\src\tests\unit_tests\test_pair_parameter_mock.cpp(17) :
                 see reference to class template instantiation
                  'testing::internal::FunctionMocker&lt;Function&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              Function=void (BorgInterface::MyBorg)
  1&gt;          ]
  1&gt;
  1&gt;Build FAILED.
  </code></pre>