title: const void (* to function)
body: <h3>Is there any difference between:</h3>
  
  <p><code>void (* const algorithm)();</code></p>
  
  <p><strong>and</strong></p>
  
  <p><code>void const (* const algorithm)();</code></p>
  
  <p><strong>when dealing with <code>const</code> pointers to static methods?</strong></p>
  
  <p>I understand that it would make sense to use <code>const</code> if the pointer points to memory that should not be modified, in case of pointers to variables, as stated in <a href="https://stackoverflow.com/a/5547209/2237467">this answer</a>. However, are function addresses not effectively constant during run-time anyway?</p>
  
  <p><sub>The reason I am asking this is, the <strong>second</strong> option as a function parameter does not work.</sub></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is the code that does not compile.</p>
  
  <pre><code>struct A {
      static void a() {}
  };
  
  void b(void const (* const callback)()) {}
  
  int main() {
      b(&amp;A::a); // No matching function for call to 'b'
  }
  </code></pre>
  
  <p>The above example works, if function <code>a()</code> has a return type <code>const void</code>.</p>