title: Should I use std::function or a function pointer in C++?
body: <p>When implementing a callback function in C++, should I still use the C-style function pointer:</p>
  
  <pre><code>void (*callbackFunc)(int);
  </code></pre>
  
  <p>Or should I make use of std::function:</p>
  
  <pre><code>std::function&lt; void(int) &gt; callbackFunc;
  </code></pre>