title: Why this code snippet works with C++17 whereas the compiler complains when using C++11?
body: <p>Why this code snippet works with C++17 whereas the compiler complains when using C++11(i.e <a href="https://godbolt.org/z/71G91P" rel="nofollow noreferrer">https://godbolt.org/z/71G91P</a>)?
  Are there any potential problems with this code snippet?</p>
  <pre><code>#include&lt;iostream&gt;
  
  class ctx
  {
      public:
          int map_create(void*){std::cout &lt;&lt; &quot;haha&quot; &lt;&lt; std::endl; return 0;};
  };
  
  ctx obj;
  typedef int (ctx::*ctx_mem_func)(void*);
  
  template &lt;ctx_mem_func func&gt;
  int regHelper(void*) 
  {
      ((&amp;obj)-&gt;*func)(nullptr);
      return 0;
  }
  
  constexpr ctx_mem_func testFunc = &amp;ctx::map_create;
  
  typedef int(*callBackFunc)(void*);
  
  int reg(callBackFunc)
  {
      return 0;
  }
  
  int main()
  {
      reg(regHelper&lt;testFunc&gt;);
      //But this expression is ok.
      reg(regHelper&lt;&amp;ctx::map_create&gt;);
      
      std::cout &lt;&lt; &quot;this is a test&quot; &lt;&lt; std::endl;
  } 
  </code></pre>
  <p>Here are the error messages when using c++11(gun 10.0.2):</p>
  <pre><code>&lt;source&gt;: In function 'int main()':
  &lt;source&gt;:30:28: error: no matches converting function 'regHelper' to type 'callBackFunc {aka int (*)(void*)}'
       reg(regHelper&lt;testFunc&gt;);
                              ^
  &lt;source&gt;:13:5: note: candidate is: template&lt;int (ctx::* func)(void*)&gt; int regHelper(void*)
   int regHelper(void*) 
       ^
  </code></pre>