title: class for handling custom exception
body: <p>I would like to create a class which takes std::function and allow to handle specified exceptions but I'm not sure if it is possible. </p>
  
  <p>Here is a pseudo draft:</p>
  
  <pre><code>//exception types
  template&lt;class... Args&gt;
  class CustomExceptionHandler
  {
  public:
      CustomExceptionHandler(std::function&lt;void()&gt; clb): clb_(std::move(clb)){}
  
      void ExecuteCallback()
      {
          try
          {
              clb_();
          }
          /*catch specified exception types*/
      }
  
  private:
      std::function&lt;void()&gt; clb_;
  };
  
  //usage
  CustomExceptionHandler&lt;std::out_of_range, std::overflow_error&gt; handler(clb);
  handler.ExecuteCallback();
  </code></pre>
  
  <p>I don't know how to use a variadic template to grab exception types and use it later. Is it possible?</p>
  
  <p>I guess that tuple may be helpful.</p>