Btk
invoker.hpp
1 #if !defined(_BTKIMPL_INVOKER_HPP_)
2 #define _BTKIMPL_INVOKER_HPP_
3 //Impl for Impl::Invoker
4 #include <tuple>
5 #include <memory>
6 namespace Btk{
7  namespace Impl{
8  template<class Callable,class ...Args>
9  struct Invoker:public std::tuple<Args...>{
10  Callable callable;
11  static void Run(void *__self){
12  Invoker *self = static_cast<Invoker*>(__self);
13  std::unique_ptr<Invoker> ptr(self);
14  std::apply(std::forward<Callable>(ptr->callable),
15  std::forward<std::tuple<Args...>&&>(*ptr));
16 
17  }
18  };
19  }
20 }
21 #endif // _BTKIMPL_INVOKER_HPP_
This header include many useful containers.
Definition: async.hpp:7
Definition: invoker.hpp:9