Inheriting member function pointers
<p>I saw this code online and I was wondering how it is implemented.  Since member function pointers cannot be assigned to a base class's member function pointers I am curious where the pointers for the derived class's member functions are being stored and how. </p>

<p>This is the header file with the test declarations</p>

<pre><code>#ifndef TestStudent_h
#define TestStudent_h

#include &lt;iostream&gt;
#include &lt;string&gt;

// Note 1
#include "TestCase.h"
#include "TestSuite.h"
#include "TestCaller.h"
#include "TestRunner.h"

#include "Student.h"

class StudentTestCase : public TestCase { // Note 2 
public:
  // constructor - Note 3
  StudentTestCase(std::string name) : TestCase(name) {}

  // method to test the constructor
  void testConstructor();

  // method to test the assigning and retrieval of grades
  void testAssignAndRetrieveGrades();

  // method to create a suite of tests
  static Test *suite ();
};
#endif
</code></pre>

<p>And this is the implementation of the function that adds the member functions to some sort of list</p>

<pre><code>// method to create a suite of tests - Note 7
Test *StudentTestCase::suite () {
  TestSuite *testSuite = new TestSuite ("StudentTestCase");

  // add the tests
  testSuite-&gt;addTest (new TestCaller  
      ("testConstructor", &amp;StudentTestCase::testConstructor));
  testSuite-&gt;addTest (new TestCaller  
      ("testAssignAndRetrieveGrades", 
       &amp;StudentTestCase::testAssignAndRetrieveGrades));
  return testSuite;
}
</code></pre>

<p>I was wondering what data type the member functions are being stored in since they cannot be stored in any function pointer type known to the base class..  Also the location where they are stored will have to know the type of the class under which these are defined since whatever entity that calls these objects will need to "link" these functions with objects of that type too right?  Specifically in this function how will <code>TestCaller</code> know how to call the member functions that were added to it?</p>