title: What is meaning of a pointer to a constant function?
body: <p>Pointers can be declared as pointing to mutable (non-const) data or pointer to constant data.<br>
  Pointers can be defined to point to a function.</p>
  
  <p>My coworkers and I were discussing the use of "const" with pointers and the question came up regarding the use of <code>const</code> with function pointers.</p>
  
  <p>Here are some questions:  </p>
  
  <ol>
  <li>What is the meaning of a pointer to a constant function versus a
  pointer to a non-constant function?</li>
  <li>Can a function be const?</li>
  <li>Can a function be non-const (mutable)?</li>
  <li>What is the proper (safe) syntax for passing a function pointer?  </li>
  </ol>
  
  <h2>Edit 1: Function pointer syntax</h2>
  
  <pre><code>typedef void (*Function_Pointer)(void); // Pointer to void function returning void.
  
  void function_a(Function_Pointer p_func); // Example 1.
  void function_b(const Function_Pointer p_func); // Example 2.
  void function_c(Function_Pointer const p_func); // Example 3.
  void function_d(const Function_Pointer const p_func); // Example 4.
  </code></pre>
  
  <p>The above declarations are examples of treating a function pointer like a pointer to an intrinsic type.  </p>
  
  <p>A data, variable or memory pointer allows for the above combinations.<br>
  So the questions are: can a function pointer have the same combinations and what is meant by a pointer to a const function (such as Example 2)?</p>