Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename... TDone>
- class ParamUnpacker
- {
- public:
- template<typename RetType, typename TNext, typename... TRest>
- static RetType ExecuteFunction(TDone... done, std::list<Object::Ref> &rest, boost::function<RetType (TDone..., TNext, TRest...)> func)
- {
- TNext next = boost::dynamic_pointer_cast<TNext::value_type>(rest.pop_front());
- return ParamUnpacker<TDone..., TNext>::template ExecuteFunction<RetType, TRest...>(done..., next, rest, func);
- }
- template<typename RetType, typename TNext>
- static RetType ExecuteFunction(TDone... done, std::list<Object::Ref> &rest, boost::function<RetType (TDone..., TNext)> func)
- {
- TNext next = boost::dynamic_pointer_cast<TNext::value_type>(rest.pop_front());
- return func(done..., next);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement