title: Function-to-function-pointer "decay"
body: <p>As we know a parameter that looks like <code>void()</code> will be rewritten as <code>void(*)()</code>. This is similar to array-to-pointer decay where <code>int[]</code> becomes <code>int*</code>. There are many cases where using an array will decay it to a pointer. Are there cases other than parameters where functions "decay"?</p>
  
  <p>The C++ standard states:</p>
  
  <p>§8.3.5/5</p>
  
  <blockquote>
    <p>... After determining the type of each parameter, any parameter of
    type “array of T” or “function returning T” is adjusted to be “pointer
    to T” or “pointer to function returning T,” respectively...</p>
  </blockquote>
  
  <p>Since the commenter below doesn't seem to believe me..here's what my compiler shows.</p>
  
  <pre><code>void handler(void func())
  {
      func(42);
  }
  
  main.cpp: In function 'void handler(void (*)())':
  main.cpp:5:12: error: too many arguments to function
       func(42);
          ^
  </code></pre>