title: How to pass const member function as non-const member function
body: <p>How to pass a <em>const member function</em> as a <em>non-const member function</em> to the template?    </p>
  
  <pre><code>class TestA 
  {
  public:
      void A() {
      }
  
      void B() const {
      }
  };
  
  template&lt;typename T, typename R, typename... Args&gt;
  void regFunc(R(T::*func)(Args...)) 
  {}
  
  void test() 
  {
      regFunc(&amp;TestA::A); // OK
      regFunc(&amp;TestA::B); // ambiguous
  }
  </code></pre>
  
  <p>Don't want to add something like: </p>
  
  <pre><code>void regFunc(R(T::*func)(Args...) const)
  </code></pre>
  
  <p>Is there a better way?</p>