Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct functor {
- std::bound_function<sig>* p;
- functor(functor*& p) {
- p = this;
- }
- operator() {
- delete p;
- }
- };
- int main() {
- functor* p;
- std::bound_function<sig>* t = new std::bound_function<sig>(functor(p));
- p->p = t;
- (*t)();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement