Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template< typename R, typename ... Args >
- struct cool_object_t {
- using fn_type = std::function< R (Args...) >;
- fn_type func;
- cool_object_t (fn_type fn) : func (fn) {}
- };
- template< typename R, typename ... Args >
- auto cool_object (std::function< R (Args...) > t) {
- return cool_object_t<R, Args...> (t);
- }
Advertisement
Add Comment
Please, Sign In to add comment