title: What is the difference of saveArg and saveArgPointee in gmock?
body: <p>I am studying in the gmock. Now Im trying to mock the class named "task", like this:</p>
  
  <pre><code>class MockTask : public Task
  {
  public:
      MOCK_METHOD3(Execute, bool(std::set&lt;std::string&gt; &amp;setDeviceIDs, int timeout, PACKET_DATA *Data));
  };
  </code></pre>
  
  <p>And I want to save the struct pdata when the task.excute is called, so that I can validate the pdata->member. This is my code:</p>
  
  <pre><code>PAKET_DATA data;
  EXPECT_CALL(task, Execute(testing::_, testing::_, testing::_))
      .WillOnce(testing::saveArg&lt;2&gt;(&amp;data));
  ASSERT_EQ(data-&gt;resultcode, 0);
  </code></pre>
  
  <p>Is that correct? And what is the difference of saveArg and saveArgPointee?</p>