title: How can I easily redirect a Base method to an identical Derived class method?
body: <p>In working with a framework (Godot) that uses a <code>register_method(&lt;name&gt;, &lt;pointer_to_method&gt;)</code> to register a c++ method to a scripting API.
  this method however doesn't support pointer to template classes.</p>
  
  <p>So in the example:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>
  static void _register_methods() {
      register_method("my_method", &amp;TMyClass::my_method); // this fails
                                 // ^ template class
  
      register_method("my_method", &amp;MyClass::my_method); // this works
                                 // ^ normal class
  }
  </code></pre>
  
  <p>I have a template class TExample and an Example that extends the template class. The methods declarations and method definitions are all inside the TExample (however the methods are registered in Example).</p>
  
  <p>So when I do:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>register_method("my_method", &amp;Example::my_method); // this fails because it is referencing the method of the parent class (template).
  </code></pre>
  
  <p>What I've found that works is redirecting the methods to "local" methods.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class Example : TExample&lt;...&gt;
  {
      public:
          void my_method() {
              TExample::my_method();
          }
  
          static void _register_methods() {
              register_method("my_method", &amp;Example::my_method); // this works
          }
  }
  </code></pre>
  
  <p>But imagine I have like 50 methods every time I want to create a new class from the template I need to redirect 50 methods. is there a shortcut to do this?!</p>