title: pointer to member function question
body: <p>I'm trying to replicate a template I've used before with a member function, and it isn't going very well. The basic form of the function is</p>
  
  <pre><code>template&lt;class T&gt;
  T Convert( HRESULT (*Foo)(T*))
  {
      T temp;
      Foo(&amp;temp); //Throw if HRESULT is a failure
      return temp;
  }
  
  HRESULT Converter(UINT* val)
  {
      *val = 1;
      return S_OK;
  }
  
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      std::cout &lt;&lt; Convert&lt;UINT&gt;(Converter) &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>For the life of me, I can't get this to work with a member variable. I've read up on their syntax, and I can't seem to figure out how to make it work with templates. </p>
  
  <p>The class would be something similar to</p>
  
  <pre><code>class TestClass
  { 
      HRESULT Converter(UINT* val)
      {
        *val = 1;
        return S_OK;
      }
  
  }
  </code></pre>