title: GMock, invoking std::function captured by SaveArg
body: <pre><code>std::function&lt;result(xxx &amp;, yyy)&gt; l_function;
  auto l_strategyMock = std::make_shared&lt;StrategyMock&gt;();
  EXPECT_CALL(*m_strategyFactoryMock, createStrategy("default", _))
              .WillRepeatedly(DoAll(SaveArg&lt;1&gt;(&amp;l_function),
                                    Return(l_strategyMock)));
  EXPECT_CALL(*l_strategyMock, invokeFunction(_, _)) //invokeFunction(xxx &amp;, yyy)
              .WillOnce(Invoke(l_defaultHoStartRequestFiller));
  </code></pre>
  
  <p>this code crashes with:</p>
  
  <pre><code>C++ exception with description "bad_function_call" thrown in the test body.
  </code></pre>
  
  <p>First function is invoked with lambda as parameter&lt;1>. I want to capture it and then call it on second EXPECT_CALL, but l_function seems not initialized.</p>
  
  <p>Is there something like "InvokePointee" to make this work?</p>