title: modern c++ alternative to function pointers
body: <p>I've been using function pointers till now, like this format in c++. I do have some uses now and then and I'm wondering is there anything else introduced in c++11/14 as their alternative.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void sayHello();
  void someFunction(void f());
  
  int main() {
  
      someFunction(sayHello);
      return 0;
  }
  void sayHello(){
      std::cout&lt;&lt;"\n Hello World";
  }
  void someFunction(void f()){
      f();
  } 
  </code></pre>
  
  <p>I did take a look at this <a href="https://stackoverflow.com/questions/26375949/using-function-pointers-in-modern-c">question</a> but couldn't understand any advantages over traditional use of function pointers. Also I would like to ask , is there anything wrong (not recommended) thing with using function pointers since I never see anyone using them. Or any other alternative present.</p>